Hello Eric!
Fist of all thank you for uploading a new version of Sana addressing
the bug to upload a new procedure!
Now I have been trying to see the uploaded data but I still can't.
Below is the complete log for a procedure upload. I believe that here
is the error openmrs.py:294, but I think you could explain me more how
to deal with it. Im just using the surgery follow up procedure as
reference. I can also post the log of my own procedure if you'd like.
Thanks in advance!
Oscar
05/22/2012 04:16:30 /mds/json/binarychunk/submit/ 0.5412s
+0.000s json.py:294 Received valid binarychunk form
+0.002s json.py:304 File _size: 612021
+0.002s api.py:358 Registering binary chunk for: encounter ->
SPDshMyKFVsDlIPisTgVdH, element_id -> patientPhoto)
+0.006s api.py:362 Success opening SavedProcedure -> 16 .
+0.013s api.py:368 Opened BinaryResource -> 15, new: False
+0.014s json.py:328 Finished processing binarychunk form
05/22/2012 04:16:29 /mds/json/binarychunk/submit/ 1.6182s
+0.000s json.py:294 Received valid binarychunk form
+0.000s json.py:304 File _size: 612021
+0.001s api.py:358 Registering binary chunk for: encounter ->
SPDshMyKFVsDlIPisTgVdH, element_id -> patientPhoto)
+0.004s api.py:362 Success opening SavedProcedure -> 16 .
+0.007s api.py:368 Opened BinaryResource -> 15, new: False
+0.015s api.py:402 upload_progress = 300000
+0.015s api.py:410 writing 312021 bytes.
+0.016s api.py:417 offset -> 612021, upload_progress = 300000
+0.023s api.py:421 Wrote binary chunk. File -> /opt/sana/media/binary/
2012/05/22/15.jpg
+0.023s api.py:422 chunk bytes -> 312021,
+0.023s api.py:424 binary upload progress -> 612021 of 612021
+0.030s api.py:151 Should I upload SPDshMyKFVsDlIPisTgVdH to the MRS?
+0.033s api.py:172 Encounter: SPDshMyKFVsDlIPisTgVdH has [u'1'] READY
and [] WAITING
+0.036s api.py:186 Uploading Encounter -> SPDshMyKFVsDlIPisTgVdH,
Binaries to upload = []
+0.041s api.py:276 patient enrolled: False
+0.137s openmrs.py:202 Success: Validating with OpenMRS loginServlet
+0.137s openmrs.py:188 Creating new patient 123
+0.724s api.py:288 Uploading to OpenMRS: 123 +8869832037
SPDshMyKFVsDlIPisTgVdH defaultdict(, {'patientPhoto': ['/opt/sana/
media/binary/2012/05/22/15.jpg']}) [{u'answer': u'1', u'question':
u'Take a picture of the patient.', u'concept': u'PATIENT PHOTO',
u'type': u'PICTURE', 'id': u'patientPhoto'}, {u'answer': u'Head and
Neck', u'question': u'Site of surgery', u'concept': u'SURGERY SITE',
u'type': u'SELECT', 'id': u'1'}, {u'answer': u'', u'question': u'Check
all that apply:', u'concept': u'SYMPTOMS', u'type': u'MULTI_SELECT',
'id': u'3'}, {u'answer': u'Stomach', u'question': u'Organ',
u'concept': u'ORGAN', u'type': u'SELECT', 'id': u'2'}, {u'answer':
u'', u'question': u'How bad is the pain?', u'concept': u'PAIN LEVEL',
u'type': u'RADIO', 'id': u'5'}, {u'answer': u'Refer to University
Hospital', u'question': u'Recommendation', u'concept':
u'RECOMMENDATION', u'type': u'MULTI_SELECT', 'id': u'7'}, {u'answer':
u'No evidence of infection', u'question': u'Diagnosis', u'concept':
u'INITIAL DIAGNOSIS', u'type': u'RADIO', 'id': u'6'}, {u'answer': u'',
u'question': u'Other duration:', u'concept': u'FOLLOW UP PERIOD',
u'type': u'ENTRY', 'id': u'9'}, {u'answer': u'3 days', u'question':
u'Follow-up in:', u'concept': u'FOLLOW UP PERIOD', u'type': u'SELECT',
'id': u'8'}, {u'answer': u'', u'question': u'Is the wound drainage:',
u'concept': u'WOUND DRAINAGE', u'type': u'RADIO', 'id': u'4'},
{u'answer': u'', u'question': u'Other comments:', u'concept':
u'COMMENTS', u'type': u'ENTRY', 'id': u'11'}, {u'answer': u'',
u'question': u'Take Picture of Surgery Site', u'concept': u'SURGERY
SITE IMAGE', u'type': u'PICTURE', 'id': u'13'}, {u'answer':
u'Coordinates not acquired.', u'question': u'Record Your Position',
u'concept': u'GPS', u'type': u'GPS', 'id': u'12'}]
+0.725s openmrs.py:256 Validating permissions to manage sana queue
+0.822s openmrs.py:260 Got result
{"status":"OK","code":"unspecified","message":"User has Manage Sana
Queue privileges"}
+0.823s openmrs.py:267 Uploading procedure
+0.823s openmrs.py:279 Encoded parameters, checking files.
+0.823s openmrs.py:285 Checking for files associated with
patientPhoto
+0.824s openmrs.py:288 medImageFile-patientPhoto-0 -> /opt/sana/media/
binary/2012/05/22/15.jpg
+0.824s openmrs.py:292 About to post to
http://120.97.32.147:8080/openmrs/moduleServlet/moca/uploadServlet
+1.084s openmrs.py:294 Got result
{"status":"FAIL","code":"unspecified","message":"date format:
05/22/2012 04:16"}
+1.084s openmrs.py:300 Done with upload
+1.084s api.py:297 API: RESULT = False
+1.085s json.py:328 Finished processing binarychunk form
05/22/2012 04:16:27 /mds/json/binarychunk/submit/ 0.2057s
+0.000s json.py:294 Received valid binarychunk form
+0.000s json.py:304 File _size: 612021
+0.001s api.py:358 Registering binary chunk for: encounter ->
SPDshMyKFVsDlIPisTgVdH, element_id -> patientPhoto)
+0.005s api.py:362 Success opening SavedProcedure -> 16 .
+0.008s api.py:368 Opened BinaryResource -> 15, new: False
+0.017s api.py:402 upload_progress = 60000
+0.017s api.py:410 writing 80000 bytes.
+0.018s api.py:417 offset -> 140000, upload_progress = 60000
+0.026s api.py:421 Wrote binary chunk. File -> /opt/sana/media/binary/
2012/05/22/15.jpg
+0.026s api.py:422 chunk bytes -> 80000,
+0.026s api.py:424 binary upload progress -> 140000 of 612021
+0.033s api.py:151 Should I upload SPDshMyKFVsDlIPisTgVdH to the MRS?
+0.036s api.py:166 BinaryResource: 15 completed: 140000/612021
+0.036s api.py:172 Encounter: SPDshMyKFVsDlIPisTgVdH has [] READY and
[u'1'] WAITING
+0.036s json.py:328 Finished processing binarychunk form
05/22/2012 04:16:27 /mds/json/binarychunk/submit/ 0.4192s
+0.000s json.py:294 Received valid binarychunk form
+0.000s json.py:304 File _size: 612021
+0.001s api.py:358 Registering binary chunk for: encounter ->
SPDshMyKFVsDlIPisTgVdH, element_id -> patientPhoto)
+0.005s api.py:362 Success opening SavedProcedure -> 16 .
+0.008s api.py:368 Opened BinaryResource -> 15, new: False
+0.016s api.py:402 upload_progress = 140000
+0.017s api.py:410 writing 160000 bytes.
+0.017s api.py:417 offset -> 300000, upload_progress = 140000
+0.024s api.py:421 Wrote binary chunk. File -> /opt/sana/media/binary/
2012/05/22/15.jpg
+0.024s api.py:422 chunk bytes -> 160000,
+0.024s api.py:424 binary upload progress -> 300000 of 612021
+0.031s api.py:151 Should I upload SPDshMyKFVsDlIPisTgVdH to the MRS?
+0.034s api.py:166 BinaryResource: 15 completed: 300000/612021
+0.034s api.py:172 Encounter: SPDshMyKFVsDlIPisTgVdH has [] READY and
[u'1'] WAITING
+0.035s json.py:328 Finished processing binarychunk form
05/22/2012 04:16:26 /mds/json/procedure/submit/ 0.0596s
+0.000s json.py:205 Received saved procedure submission.
+0.006s api.py:88 Registering saved procedure SPDshMyKFVsDlIPisTgVdH
+0.006s api.py:90 sp_guid -> SPDshMyKFVsDlIPisTgVdH, client_id ->
{"patientPhoto":{"answer":"1","type":"PICTURE","concept":"PATIENT
PHOTO","question":"Take a picture of the
patient."},"patientBirthdateYear":
{"answer":"1984","type":"ENTRY","concept":"BIRTHDATE
YEAR","question":"Year:"},"patientBirthdateMonth":
{"answer":"January","type":"SELECT","concept":"BIRTHDATE
MONTH","question":"Enter Patient's Birthdate Month:"},"patientGender":
{"answer":"Male","type":"RADIO","concept":"GENDER","question":"Select
Patient's Gender:"},"patientEnrolled":
{"answer":"Yes","id":"patientEnrolled","type":"RADIO","question":"Does
the patient already have an ID card?"},"13":
{"answer":"","type":"PICTURE","concept":"SURGERY SITE
IMAGE","question":"Take Picture of Surgery Site"},"patientFirstName":
{"answer":"Josue","type":"ENTRY","concept":"FIRST
NAME","question":"Enter Patient's First Name:"},"11":
{"answer":"","type":"ENTRY","concept":"COMMENTS","question":"Other
comments:"},"12":{"answer":"Coordinates not
acquired.","type":"GPS","concept":"GPS","question":"Record Your
Position"},"3":
{"answer":"","type":"MULTI_SELECT","concept":"SYMPTOMS","question":"Check
all that apply:"},"patientId":
{"answer":"123","type":"PATIENT_ID","concept":"PATIENT
ID","question":"Enter Patient's Medical Record ID
Number:"},"patientLastName":
{"answer":"Cifuentes","type":"ENTRY","concept":"LAST
NAME","question":"Enter Patient's Last Name:"},"2":
{"answer":"Stomach","type":"SELECT","concept":"ORGAN","question":"Organ"},"1":
{"answer":"Head and Neck","type":"SELECT","concept":"SURGERY
SITE","question":"Site of surgery"},"7":{"answer":"Refer to University
Hospital","type":"MULTI_SELECT","concept":"RECOMMENDATION","question":"Recommendation"},"6":
{"answer":"No evidence of infection","type":"RADIO","concept":"INITIAL
DIAGNOSIS","question":"Diagnosis"},"5":
{"answer":"","type":"RADIO","concept":"PAIN LEVEL","question":"How bad
is the pain?"},"procedureTitle":{"answer":"Surgery Follow-
Up","id":"procedureTitle","type":"HIDDEN"},"4":
{"answer":"","type":"RADIO","concept":"WOUND DRAINAGE","question":"Is
the wound drainage:"},"9":
{"answer":"","type":"ENTRY","concept":"FOLLOW UP
PERIOD","question":"Other duration:"},"8":{"answer":"3
days","type":"SELECT","concept":"FOLLOW UP PERIOD","question":"Follow-
up in:"},"patientBirthdateDay":
{"answer":"01","type":"SELECT","concept":"BIRTHDATE
DAY","question":"Day:"}}, responses -> +8869832037
+0.028s api.py:112 patientLastName : {u'answer': u'Cifuentes',
u'question': u"Enter Patient's Last Name:", u'concept': u'LAST NAME',
u'type': u'ENTRY'}
+0.028s api.py:112 patientEnrolled : {u'answer': u'Yes', u'question':
u'Does the patient already have an ID card?', u'type': u'RADIO',
u'id': u'patientEnrolled'}
+0.028s api.py:112 procedureTitle : {u'answer': u'Surgery Follow-Up',
u'type': u'HIDDEN', u'id': u'procedureTitle'}
+0.029s api.py:112 patientPhoto : {u'answer': u'1', u'question':
u'Take a picture of the patient.', u'concept': u'PATIENT PHOTO',
u'type': u'PICTURE'}
+0.042s api.py:134 BinaryResource -> 15 has file -> /opt/sana/media/
binary/2012/05/22/15.jpg
+0.050s api.py:112 patientGender : {u'answer': u'Male', u'question':
u"Select Patient's Gender:", u'concept': u'GENDER', u'type': u'RADIO'}
+0.050s api.py:112 patientBirthdateYear : {u'answer': u'1984',
u'question': u'Year:', u'concept': u'BIRTHDATE YEAR', u'type':
u'ENTRY'}
+0.050s api.py:112 patientId : {u'answer': u'123', u'question':
u"Enter Patient's Medical Record ID Number:", u'concept': u'PATIENT
ID', u'type': u'PATIENT_ID'}
+0.051s api.py:112 1 : {u'answer': u'Head and Neck', u'question':
u'Site of surgery', u'concept': u'SURGERY SITE', u'type': u'SELECT'}
+0.051s api.py:112 3 : {u'answer': u'', u'question': u'Check all that
apply:', u'concept': u'SYMPTOMS', u'type': u'MULTI_SELECT'}
+0.051s api.py:112 2 : {u'answer': u'Stomach', u'question': u'Organ',
u'concept': u'ORGAN', u'type': u'SELECT'}
+0.052s api.py:112 5 : {u'answer': u'', u'question': u'How bad is the
pain?', u'concept': u'PAIN LEVEL', u'type': u'RADIO'}
+0.052s api.py:112 patientBirthdateMonth : {u'answer': u'January',
u'question': u"Enter Patient's Birthdate Month:", u'concept':
u'BIRTHDATE MONTH', u'type': u'SELECT'}
+0.052s api.py:112 7 : {u'answer': u'Refer to University Hospital',
u'question': u'Recommendation', u'concept': u'RECOMMENDATION',
u'type': u'MULTI_SELECT'}
+0.053s api.py:112 6 : {u'answer': u'No evidence of infection',
u'question': u'Diagnosis', u'concept': u'INITIAL DIAGNOSIS', u'type':
u'RADIO'}
+0.053s api.py:112 9 : {u'answer': u'', u'question': u'Other
duration:', u'concept': u'FOLLOW UP PERIOD', u'type': u'ENTRY'}
+0.053s api.py:112 8 : {u'answer': u'3 days', u'question': u'Follow-
up in:', u'concept': u'FOLLOW UP PERIOD', u'type': u'SELECT'}
+0.054s api.py:112 4 : {u'answer': u'', u'question': u'Is the wound
drainage:', u'concept': u'WOUND DRAINAGE', u'type': u'RADIO'}
+0.054s api.py:112 patientFirstName : {u'answer': u'Josue',
u'question': u"Enter Patient's First Name:", u'concept': u'FIRST
NAME', u'type': u'ENTRY'}
+0.054s api.py:112 11 : {u'answer': u'', u'question': u'Other
comments:', u'concept': u'COMMENTS', u'type': u'ENTRY'}
+0.055s api.py:112 13 : {u'answer': u'', u'question': u'Take Picture
of Surgery Site', u'concept': u'SURGERY SITE IMAGE', u'type':
u'PICTURE'}
+0.055s api.py:112 12 : {u'answer': u'Coordinates not acquired.',
u'question': u'Record Your Position', u'concept': u'GPS', u'type':
u'GPS'}
+0.055s api.py:112 patientBirthdateDay : {u'answer': u'01',
u'question': u'Day:', u'concept': u'BIRTHDATE DAY', u'type':
u'SELECT'}
+0.056s api.py:151 Should I upload SPDshMyKFVsDlIPisTgVdH to the MRS?
+0.058s api.py:166 BinaryResource: 15 completed: 0/0
+0.058s api.py:172 Encounter: SPDshMyKFVsDlIPisTgVdH has [] READY and
[u'1'] WAITING
+0.059s json.py:224 Saved procedure successfully registerd.
05/22/2012 04:16:26 /mds/json/binarychunk/submit/ 0.0673s
+0.000s json.py:294 Received valid binarychunk form
+0.000s json.py:304 File _size: 612021
+0.000s api.py:358 Registering binary chunk for: encounter ->
SPDshMyKFVsDlIPisTgVdH, element_id -> patientPhoto)
+0.005s api.py:362 Success opening SavedProcedure -> 16 .
+0.009s api.py:368 Opened BinaryResource -> 15, new: False
+0.016s api.py:402 upload_progress = 0
+0.016s api.py:410 writing 20000 bytes.
+0.016s api.py:417 offset -> 20000, upload_progress = 0
+0.024s api.py:421 Wrote binary chunk. File -> /opt/sana/media/binary/
2012/05/22/15.jpg
+0.024s api.py:422 chunk bytes -> 20000,
+0.024s api.py:424 binary upload progress -> 20000 of 612021
+0.030s api.py:151 Should I upload SPDshMyKFVsDlIPisTgVdH to the MRS?
+0.034s api.py:166 BinaryResource: 15 completed: 20000/612021
+0.034s api.py:172 Encounter: SPDshMyKFVsDlIPisTgVdH has [] READY and
[u'1'] WAITING
+0.034s json.py:328 Finished processing binarychunk form
05/22/2012 04:16:26 /mds/json/binarychunk/submit/ 0.1092s
+0.000s json.py:294 Received valid binarychunk form
+0.000s json.py:304 File _size: 612021
+0.001s api.py:358 Registering binary chunk for: encounter ->
SPDshMyKFVsDlIPisTgVdH, element_id -> patientPhoto)
+0.004s api.py:362 Success opening SavedProcedure -> 16 .
+0.007s api.py:368 Opened BinaryResource -> 15, new: False
+0.014s api.py:402 upload_progress = 20000
+0.014s api.py:410 writing 40000 bytes.
+0.015s api.py:417 offset -> 60000, upload_progress = 20000
+0.022s api.py:421 Wrote binary chunk. File -> /opt/sana/media/binary/
2012/05/22/15.jpg
+0.022s api.py:422 chunk bytes -> 40000,
+0.023s api.py:424 binary upload progress -> 60000 of 612021
+0.028s api.py:151 Should I upload SPDshMyKFVsDlIPisTgVdH to the MRS?
+0.030s api.py:166 BinaryResource: 15 completed: 60000/612021
+0.030s api.py:172 Encounter: SPDshMyKFVsDlIPisTgVdH has [] READY and
[u'1'] WAITING
+0.030s json.py:328 Finished processing binarychunk form
05/22/2012 04:16:01 /mds/json/patient/123/ 0.1345s
+0.000s json.py:559 entering patient get proc
+0.001s json.py:563 About to getPatient
+0.134s json.py:575 finished patient_get