Uploading and installing a new procedure on android client(Taipei Medical University)

44 views
Skip to first unread message

Oscar Cifuentes

unread,
May 2, 2012, 1:44:51 AM5/2/12
to sana-developers
Hello! My name is Oscar and I've been working on OpenMRS and Sana for
a project in my university (Taipei Medical University).

I already have the OpenMRS and the MDS server working.
I also have a new procedure for Filariasis that looks something like
this:

<Procedure title="Filariasis Follow-Up" author="TMU">
<Page><Element type="SELECT" concept="DISEASE DIAGNOSIS" id="1"
question="Kind of the Disease" answer="" choices="Lymph
Edema,Elephantitis,Scrotum swelling,Others"/>
</Page>

I tried to copy it here /mnt/sdcard/media/sana/resource/procedure/ but
this directory does not appear to be in the tablet, we are using NOVO
7 Advanced with ICS.

And the source code from the both svn have errors when I imported them
to eclipse.

Do you have any suggestions or a work around to upload a new procedure
to the tablet?

Thank you in advance!

Eric Winkler

unread,
May 2, 2012, 10:30:12 AM5/2/12
to sana-de...@googlegroups.com
Hi Oscar,
I think I found the issue with the directories. It looks like a couple of required permissions were accidentally removed from the source code. You should be able to  correct the problem by adding:

<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

to the application manifest. I will patch the source code in the repository shortly.

Regarding the compilation errors, which branch of the code and Eclipse are you using? Please provide that information as well as any additional details you may have on the import errors and I should be able to help a bit more.
Best,
Eric

Oscar Cifuentes

unread,
May 2, 2012, 10:25:40 PM5/2/12
to sana-developers
Hello Eric! Thank you for the response!

regarding the branch I am using this one
https://moca.googlecode.com/svn/clients/android/branches/sana-release-1.1.x/

and I also tried the trunk
https://moca.googlecode.com/svn/clients/android/trunk

I am using
Eclipse IDE for Java Developers
Version: Indigo Service Release 2

I have also downloaded all the android sdks...
and even tho the emulator is running I also get android-4 error
Is there an specific version of the emulator in which sana will run?

Thank you for the help!!

Oscar

Eric Winkler

unread,
May 3, 2012, 6:40:54 AM5/3/12
to sana-de...@googlegroups.com
Hi Oscar,
Both versions in the repo are set to build on Android 1.6 (API 4) but should also build on any of the newer versions as well as run on a compatible emulator. The version in the trunk should be considered highly unstable right now so I would use the 1.1 branch if you want something you can run without too many problems.

With respect to the android-4 error, it is not clear to me if it is an issue with building or running from what you had described. I would start with the following (assumes you are using eclipse).

1. From the package explorer Right Click --> Android Tools --> Fix project properties.
2. Clean and Build.
3. Check the project properties and look at the Android --> Project Build Target. If any platform level is missing this should show it.

Let me know if that helps or if it gives you some additional error messages.
Best,
Eric

Oscar Cifuentes

unread,
May 3, 2012, 10:52:29 AM5/3/12
to sana-developers
Thank you Eric!

Actually I went the other way, uploading the XLM file to the tablet.
Because I have to present the prototype of the project tomorrow.

But later I will check in the code in Eclipse, to understand it more
clearly.

Now I have another question. Everything is working and in sync
(openMrs, MDS and Sana). I can see the new patients uploaded from the
tablet to the server, but only their basic information. The specific
info from the procedure I cannot see. I have already created the
concepts in the dictionary according how the appear in my xml file.
What else should I have to change/add in openMRS so I can see the
other observations?

Thanks again!

Oscar

Eric Winkler

unread,
May 3, 2012, 9:41:20 PM5/3/12
to sana-de...@googlegroups.com
Hi Oscar,
Once the data reaches the dispatch server, the patient demo info is processed first which effectively registers the patient in system prior to transmitting the encounter data. Point being there might be something going wrong during the second part of that and hence why you might see the patient registration info but not the encounter data. Hard to say what could be causing that without more info but you should be able to get something useful from either the tomcat logs in /var/log/tomcat6/catalina.out or by looking at the mds logs which you can view through a browser at http://<your-server>/mds/log. For the mds log, you can click on one of the items and should expand. The server is packaged to run in debug mode so it may show quite a few lines but there will likely be something in the lines toward the bottom indicating an Exception if something went wrong. 

Let me know if you find anything.
Best,
Eric

Oscar Cifuentes

unread,
May 22, 2012, 5:15:29 AM5/22/12
to sana-developers
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

Eric Winkler

unread,
May 24, 2012, 11:10:00 AM5/24/12
to sana-de...@googlegroups.com
Hi Oscar,
The particular issue is related to the line you see below:

+1.084s openmrs.py:294  Got result 
{"status":"FAIL","code":"unspecified","message":"date format: 
05/22/2012 04:16"} 

I believe it is related to an issue in the UploadServlet that shows up when the local date format is changed from the default. The good news is I think we have a solution (Many thanks to Dave S.). I need to test it but will get an updated version of the module posted as soon that is complete, hopefully within the next few days. 
Best,
Eric

PS If you want to try it yourself, do the following in UploadServlet.java starting at line 204:

Change:
204 SimpleDateFormat sdf = Context.getDateFormat();
to 
204 String pattern = "MM/dd/yyyy"; 
205 SimpleDateFormat sdf = new SimpleDateFormat(pattern);

Okuboyejo Damilola

unread,
Jun 14, 2012, 9:02:04 AM6/14/12
to sana-de...@googlegroups.com
Hi Eric

I started having this same problem since yesterday. After trying the above I 
still can't get it to work.
Your help would be highly appreciated.
Also could you advice what could have caused change in my locale date format 
the app was working perfectly day before yesterday.
Thanks.

Damilola

Eric Winkler

unread,
Jun 14, 2012, 11:26:04 PM6/14/12
to sana-de...@googlegroups.com
The above patch effectively hard codes the format. While I would consider that potentially problematic, the only communications to the UploadServlet should come from the dispatch server so there is a value in having the format static. Going forward, we will revisit this issue to see if there is a better way to synchronize the format between mds and OpenMRS that is more flexible but not sensitive to per user changes. 

Quick question, did you update or remove and reinstall the module? If you updated, it might be that the module did not actually update if the version number had not been updated (I ran into that issue when I started testing). 

Hope that helps.
Best,
Eric 

PS The Ubuntu packages aren't quite rebuilt yet but a minor version update of the omod, now at 1.1.2, is available for download from the repository.
sana-1.1.2.omod

Okuboyejo Damilola

unread,
Jun 15, 2012, 12:07:50 PM6/15/12
to sana-de...@googlegroups.com
Hi Eric,

Thanks for the patch.

Interestingly, I tried some couple of things before applying the patch and something interesting was noticed.

After tailing the tomcat log, I noticed that whenever a concept is not defined and can't be created, the date format error would surface. Once I add or modify the concept in openmrs, the problem disappears.

So, I didn't need to apply the update to avoid the hardcoding issue.

My question would be that at what time does openmrs create a new concept using code and when we have to manually create one. The question result because I noticed openmrs does not complain for 'FIRST NAME' concept used in the findpatient procedure that is automatically attached to all procedures, yet openmrs didn't complain.

Can you share any light on these.

Eric Winkler

unread,
Jun 15, 2012, 12:55:14 PM6/15/12
to sana-de...@googlegroups.com
Hi Damilola,
I believe what you were seeing with respect to the "Date format" issue showing up during an attempt to create a Concept was in fact a side effect caused by format and concept creation methods being bundled in the same try catch block. Those two exception catches were separated out in the last commit and hence the most recent version of the omod in the repository. Upshot being you shouldn't an odd date format message when there is an error creating the Concept.

To your more general question about when Concepts are created dynamically during upload as opposed to manually through the web interface, as of version 1.1 the Sana module introduced a setting accessible in the Administration tab, Global Properties --> moca.allowEncounterConceptCreation, which toggles whether to allow dynamic creation. My general opinion on dynamic creation is that, if allowed, it does pose risks that you should be aware since it is problematic to introduce an authority which validates the Concept there. I believe this is especially true with the more recent versions of the client where the end users can add procedures to the phone manually. From user perspective, having to manually type in each Concept is not very efficient and not entirely desirable either. The best solution is to allow bulk uploads by someone with admin rights such as through the  Admin --> Sana --> Manage Medical Vocabulary screen. That is particular servlet is due for an update but has been delayed while we port the main Sana module to the current release version of OpenMRS.  

Hope that helps. Let me know if you would like more information.
Best,
Eric

Okuboyejo Damilola

unread,
Jun 16, 2012, 5:02:15 AM6/16/12
to sana-de...@googlegroups.com
Hi Eric,

Thanks for the guide. I'll apply the update.
I'll also say separating the date format and concept access/creation is a brilliant one. I was actually also wondering initially why access/creation of concept would throw date format exception.

Cheers!

Okuboyejo Damilola

unread,
Jun 16, 2012, 5:02:16 AM6/16/12
to sana-de...@googlegroups.com
Hi Eric,

Thanks for the guide. I'll apply the update.

Reply all
Reply to author
Forward
0 new messages