Collect and OpenMRS

Hi All,

I'm trying to interface ODK Collect with the OpenMRS database, but
Collect always shows that there is no form to download. I think that
this because of how OpenMRS outputs the formlist.xml file, which
doesn't show the URL of the forms (where to get them). Furthermore,
the formlist.xml outputted by OpenMRS presents a different structure
from the one outputted by Aggregate. Does anyone know how I could go
about solving this?

Secondly, (and more importantly for me), I was able to copy the xml
forms in the app folder on the phone and fill them out, but cannot
send those results to OpenMRS. Collect prints out a "failed
transmission" error, but server name, username and password are
correct. Does anyone know how I could fix this?

Thanks,
Jesse

hi jesse,

try odk clinic. http://code.google.com/p/opendatakit/wiki/ODKClinic.
the trunk version does form filling against openmrs.

yaw

··· On Thu, Mar 3, 2011 at 19:11, Jesse Qualliotine wrote: > Hi All, > > I'm trying to interface ODK Collect with the OpenMRS database, but > Collect always shows that there is no form to download. I think that > this because of how OpenMRS outputs the formlist.xml file, which > doesn't show the URL of the forms (where to get them). Furthermore, > the formlist.xml outputted by OpenMRS presents a different structure > from the one outputted by Aggregate. Does anyone know how I could go > about solving this? > > Secondly, (and more importantly for me), I was able to copy the xml > forms in the app folder on the phone and fill them out, but cannot > send those results to OpenMRS. Collect prints out a "failed > transmission" error, but server name, username and password are > correct. Does anyone know how I could fix this? > > Thanks, > Jesse > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >

Hi Yaw,

I have ODK Clinic, but I am not able to download my patients or cohorts.
The server URL, username, and password are all correct, but when I attempt
to download patients it fails. When I hit download patients, a "select
cohort" menu pops up. If I select a cohort, the screen turns white before I
can hit download and nothing happens (i.e. the circle on the right does not
fill in green, indicating that I have selected the cohort because the screen
turns white as soon as I tap any cohort). Is there something that I am not
doing correctly?

Thanks,
Jesse

··· On Thu, Mar 3, 2011 at 10:54 PM, Yaw Anokwa wrote:

hi jesse,

try odk clinic. http://code.google.com/p/opendatakit/wiki/ODKClinic.
the trunk version does form filling against openmrs.

yaw

On Thu, Mar 3, 2011 at 19:11, Jesse Qualliotine jqualliotine@gmail.com wrote:

Hi All,

I'm trying to interface ODK Collect with the OpenMRS database, but
Collect always shows that there is no form to download. I think that
this because of how OpenMRS outputs the formlist.xml file, which
doesn't show the URL of the forms (where to get them). Furthermore,
the formlist.xml outputted by OpenMRS presents a different structure
from the one outputted by Aggregate. Does anyone know how I could go
about solving this?

Secondly, (and more importantly for me), I was able to copy the xml
forms in the app folder on the phone and fill them out, but cannot
send those results to OpenMRS. Collect prints out a "failed
transmission" error, but server name, username and password are
correct. Does anyone know how I could fix this?

Thanks,
Jesse

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

Hi Jesse,

Am suspecting something but am not very sure until when you try doing this:

Create a second cohort in OpenMRS and then try again to download cohorts.
After that, are you now able to select a cohort? At least the second cohort?

If yes, now delete the second cohort from OpenMRS and then try to ensure you
get the same problem as before.

If yes,
Look for:

org.odk.clinic.android.activities.DownloadPatientActivity:createCohortDialog()

and replace the line:

int cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, -1);

with something like:

    int cohortId = -1;
    try{
        cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, -1);
    }
    catch(Exception ex){
        //whatever......
    }

If all that works for you, then my suspicion is correct.

··· On Fri, Mar 4, 2011 at 7:43 AM, Jesse Qualliotine wrote:

Hi Yaw,

I have ODK Clinic, but I am not able to download my patients or cohorts.
The server URL, username, and password are all correct, but when I attempt
to download patients it fails. When I hit download patients, a "select
cohort" menu pops up. If I select a cohort, the screen turns white before I
can hit download and nothing happens (i.e. the circle on the right does not
fill in green, indicating that I have selected the cohort because the screen
turns white as soon as I tap any cohort). Is there something that I am not
doing correctly?

Thanks,
Jesse

On Thu, Mar 3, 2011 at 10:54 PM, Yaw Anokwa yanokwa@gmail.com wrote:

hi jesse,

try odk clinic. http://code.google.com/p/opendatakit/wiki/ODKClinic.
the trunk version does form filling against openmrs.

yaw

On Thu, Mar 3, 2011 at 19:11, Jesse Qualliotine jqualliotine@gmail.com wrote:

Hi All,

I'm trying to interface ODK Collect with the OpenMRS database, but
Collect always shows that there is no form to download. I think that
this because of how OpenMRS outputs the formlist.xml file, which
doesn't show the URL of the forms (where to get them). Furthermore,
the formlist.xml outputted by OpenMRS presents a different structure
from the one outputted by Aggregate. Does anyone know how I could go
about solving this?

Secondly, (and more importantly for me), I was able to copy the xml
forms in the app folder on the phone and fill them out, but cannot
send those results to OpenMRS. Collect prints out a "failed
transmission" error, but server name, username and password are
correct. Does anyone know how I could fix this?

Thanks,
Jesse

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

daniel,

what exactly is your suspicion?

yaw

··· On Fri, Mar 4, 2011 at 05:52, Daniel Kayiwa wrote: > > Hi Jesse, > > Am suspecting something but am not very sure until when you try doing this: > > Create a second cohort in OpenMRS and then try again to download cohorts. > After that, are you now able to select a cohort? At least the second cohort? > > If yes, now delete the second cohort from OpenMRS and then try to ensure you > get the same problem as before. > > If yes, > Look for: > > org.odk.clinic.android.activities.DownloadPatientActivity:createCohortDialog() > > and replace the line: > > int cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, -1); > > > with something like: > > int cohortId = -1; > try{ > cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, -1); > } > catch(Exception ex){ > //whatever...... > } > > If all that works for you, then my suspicion is correct. > > > > On Fri, Mar 4, 2011 at 7:43 AM, Jesse Qualliotine wrote: >> >> Hi Yaw, >> I have ODK Clinic, but I am not able to download my patients or cohorts. >> The server URL, username, and password are all correct, but when I attempt >> to download patients it fails. When I hit download patients, a "select >> cohort" menu pops up. If I select a cohort, the screen turns white before I >> can hit download and nothing happens (i.e. the circle on the right does not >> fill in green, indicating that I have selected the cohort because the screen >> turns white as soon as I tap any cohort). Is there something that I am not >> doing correctly? >> Thanks, >> Jesse >> On Thu, Mar 3, 2011 at 10:54 PM, Yaw Anokwa wrote: >>> >>> hi jesse, >>> >>> try odk clinic. http://code.google.com/p/opendatakit/wiki/ODKClinic. >>> the trunk version does form filling against openmrs. >>> >>> yaw >>> >>> On Thu, Mar 3, 2011 at 19:11, Jesse Qualliotine wrote: >>> > Hi All, >>> > >>> > I'm trying to interface ODK Collect with the OpenMRS database, but >>> > Collect always shows that there is no form to download. I think that >>> > this because of how OpenMRS outputs the formlist.xml file, which >>> > doesn't show the URL of the forms (where to get them). Furthermore, >>> > the formlist.xml outputted by OpenMRS presents a different structure >>> > from the one outputted by Aggregate. Does anyone know how I could go >>> > about solving this? >>> > >>> > Secondly, (and more importantly for me), I was able to copy the xml >>> > forms in the app folder on the phone and fill them out, but cannot >>> > send those results to OpenMRS. Collect prints out a "failed >>> > transmission" error, but server name, username and password are >>> > correct. Does anyone know how I could fix this? >>> > >>> > Thanks, >>> > Jesse >>> > >>> > -- >>> > Post: opendatakit@googlegroups.com >>> > Unsubscribe: opendatakit+unsubscribe@googlegroups.com >>> > Options: http://groups.google.com/group/opendatakit?hl=en >>> > >> >> -- >> Post: opendatakit@googlegroups.com >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en > > > > -- > If we keep uppermost in our minds the unkind and unjust acts of others, we > shall find it impossible to love them as Christ has loved us; but if our > thoughts dwell upon the wondrous love and pity of Christ for us, the same > spirit will flow out to others. >

Am suspecting that:

settings.getInt(PreferencesActivity.KEY_COHORT, -1);

could be failing in some way and throwing an exception which results into
the code below it not executing leading to what she is getting.

··· On Fri, Mar 4, 2011 at 6:07 PM, Yaw Anokwa wrote:

daniel,

what exactly is your suspicion?

yaw

On Fri, Mar 4, 2011 at 05:52, Daniel Kayiwa kayiwadaniel@gmail.com wrote:

Hi Jesse,

Am suspecting something but am not very sure until when you try doing
this:

Create a second cohort in OpenMRS and then try again to download cohorts.
After that, are you now able to select a cohort? At least the second
cohort?

If yes, now delete the second cohort from OpenMRS and then try to ensure
you
get the same problem as before.

If yes,
Look for:

org.odk.clinic.android.activities.DownloadPatientActivity:createCohortDialog()

and replace the line:

int cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, -1);

with something like:

    int cohortId = -1;
    try{
        cohortId = settings.getInt(PreferencesActivity.KEY_COHORT,

-1);

    }
    catch(Exception ex){
        //whatever......
    }

If all that works for you, then my suspicion is correct.

On Fri, Mar 4, 2011 at 7:43 AM, Jesse Qualliotine < jqualliotine@gmail.com> wrote:

Hi Yaw,
I have ODK Clinic, but I am not able to download my patients or cohorts.
The server URL, username, and password are all correct, but when I
attempt

to download patients it fails. When I hit download patients, a "select
cohort" menu pops up. If I select a cohort, the screen turns white
before I

can hit download and nothing happens (i.e. the circle on the right does
not

fill in green, indicating that I have selected the cohort because the
screen

turns white as soon as I tap any cohort). Is there something that I am
not

doing correctly?
Thanks,
Jesse
On Thu, Mar 3, 2011 at 10:54 PM, Yaw Anokwa yanokwa@gmail.com wrote:

hi jesse,

try odk clinic. http://code.google.com/p/opendatakit/wiki/ODKClinic.
the trunk version does form filling against openmrs.

yaw

On Thu, Mar 3, 2011 at 19:11, Jesse Qualliotine < jqualliotine@gmail.com> wrote:

Hi All,

I'm trying to interface ODK Collect with the OpenMRS database, but
Collect always shows that there is no form to download. I think that
this because of how OpenMRS outputs the formlist.xml file, which
doesn't show the URL of the forms (where to get them). Furthermore,
the formlist.xml outputted by OpenMRS presents a different structure
from the one outputted by Aggregate. Does anyone know how I could go
about solving this?

Secondly, (and more importantly for me), I was able to copy the xml
forms in the app folder on the phone and fill them out, but cannot
send those results to OpenMRS. Collect prints out a "failed
transmission" error, but server name, username and password are
correct. Does anyone know how I could fix this?

Thanks,
Jesse

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
If we keep uppermost in our minds the unkind and unjust acts of others,
we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

--
If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

Daniel,

You were exactly right. That issue is now solved and I am able to download
patients. Thanks!
Unfortunately a new problem has arisen. I now am able to see all my
patients, but when I select any patient, the program freezes for ten
seconds, turns black for 20 seconds, then crashes with an error message:
"The application ODK Clinic (process org.odk.clinic.android) has stopped
unexpectedly. Please try Again." This happens for all my patients. Do you
know what is causing this?

I also have another question in general. It seems to me that ODK clinic
allows one to visualize OpenMRS patient data and to edit data of existing
patients. I haven't found a way to add a new patient with ODK Clinic, which
is crucial for field testing a medical device. Am I overlooking a way to do
this? Also, I know that it was suggested that I try to work with ODK Clinic
to edit OpenMRS patient data, but for my project I must send data via
bluetooth to phone, which automatically fills it into an XForm and updates
the OpenMRS server. Are there still ongoing efforts to allow ODK Collect to
communicate with oMRS? If not, what was the reason for not?

Thanks again,
Jesse

··· On Fri, Mar 4, 2011 at 10:17 AM, Daniel Kayiwa wrote:

Am suspecting that:

settings.getInt(PreferencesActivity.KEY_COHORT, -1);

could be failing in some way and throwing an exception which results into
the code below it not executing leading to what she is getting.

On Fri, Mar 4, 2011 at 6:07 PM, Yaw Anokwa yanokwa@gmail.com wrote:

daniel,

what exactly is your suspicion?

yaw

On Fri, Mar 4, 2011 at 05:52, Daniel Kayiwa kayiwadaniel@gmail.com wrote:

Hi Jesse,

Am suspecting something but am not very sure until when you try doing
this:

Create a second cohort in OpenMRS and then try again to download
cohorts.
After that, are you now able to select a cohort? At least the second
cohort?

If yes, now delete the second cohort from OpenMRS and then try to ensure
you
get the same problem as before.

If yes,
Look for:

org.odk.clinic.android.activities.DownloadPatientActivity:createCohortDialog()

and replace the line:

int cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, -1);

with something like:

    int cohortId = -1;
    try{
        cohortId = settings.getInt(PreferencesActivity.KEY_COHORT,

-1);

    }
    catch(Exception ex){
        //whatever......
    }

If all that works for you, then my suspicion is correct.

On Fri, Mar 4, 2011 at 7:43 AM, Jesse Qualliotine < jqualliotine@gmail.com> wrote:

Hi Yaw,
I have ODK Clinic, but I am not able to download my patients or
cohorts.

The server URL, username, and password are all correct, but when I
attempt

to download patients it fails. When I hit download patients, a "select
cohort" menu pops up. If I select a cohort, the screen turns white
before I

can hit download and nothing happens (i.e. the circle on the right does
not

fill in green, indicating that I have selected the cohort because the
screen

turns white as soon as I tap any cohort). Is there something that I am
not

doing correctly?
Thanks,
Jesse
On Thu, Mar 3, 2011 at 10:54 PM, Yaw Anokwa yanokwa@gmail.com wrote:

hi jesse,

try odk clinic. http://code.google.com/p/opendatakit/wiki/ODKClinic.
the trunk version does form filling against openmrs.

yaw

On Thu, Mar 3, 2011 at 19:11, Jesse Qualliotine < jqualliotine@gmail.com> wrote:

Hi All,

I'm trying to interface ODK Collect with the OpenMRS database, but
Collect always shows that there is no form to download. I think
that

this because of how OpenMRS outputs the formlist.xml file, which
doesn't show the URL of the forms (where to get them). Furthermore,
the formlist.xml outputted by OpenMRS presents a different structure
from the one outputted by Aggregate. Does anyone know how I could
go

about solving this?

Secondly, (and more importantly for me), I was able to copy the xml
forms in the app folder on the phone and fill them out, but cannot
send those results to OpenMRS. Collect prints out a "failed
transmission" error, but server name, username and password are
correct. Does anyone know how I could fix this?

Thanks,
Jesse

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
If we keep uppermost in our minds the unkind and unjust acts of others,
we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the
same
spirit will flow out to others.

--
If we keep uppermost in our minds the unkind and unjust acts of others, we
shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the same
spirit will flow out to others.

Jesse,

regarding your first issue, try to plug the phone to your computer
and, assuming you have eclipse and ADB installed (otherwise, how could
you modify the code as suggested by Daniel), either try to see in the
LogCat view (Window > Show View > Other > Android > Logcat) which is
the exact error you are getting, or simply run

adb logcat

from your favourite command line

both options will give you a more detailed information about the error
and will help you to find out what's going on.

I hope it helps,

pau.

··· 2011/3/4 Jesse Qualliotine : > Daniel, > You were exactly right. That issue is now solved and I am able to download > patients. Thanks! > Unfortunately a new problem has arisen. I now am able to see all my > patients, but when I select any patient, the program freezes for ten > seconds, turns black for 20 seconds, then crashes with an error message: > "The application ODK Clinic (process org.odk.clinic.android) has stopped > unexpectedly. Please try Again." This happens for all my patients. Do you > know what is causing this? > I also have another question in general. It seems to me that ODK clinic > allows one to visualize OpenMRS patient data and to edit data of existing > patients. I haven't found a way to add a new patient with ODK Clinic, which > is crucial for field testing a medical device. Am I overlooking a way to do > this? Also, I know that it was suggested that I try to work with ODK Clinic > to edit OpenMRS patient data, but for my project I must send data via > bluetooth to phone, which automatically fills it into an XForm and updates > the OpenMRS server. Are there still ongoing efforts to allow ODK Collect to > communicate with oMRS? If not, what was the reason for not? > Thanks again, > Jesse > On Fri, Mar 4, 2011 at 10:17 AM, Daniel Kayiwa wrote: >> >> Am suspecting that: >> >> settings.getInt(PreferencesActivity.KEY_COHORT, -1); >> >> >> >> could be failing in some way and throwing an exception which results into >> the code below it not executing leading to what she is getting. >> >> >> On Fri, Mar 4, 2011 at 6:07 PM, Yaw Anokwa wrote: >>> >>> daniel, >>> >>> what exactly is your suspicion? >>> >>> yaw >>> >>> On Fri, Mar 4, 2011 at 05:52, Daniel Kayiwa wrote: >>> > >>> > Hi Jesse, >>> > >>> > Am suspecting something but am not very sure until when you try doing >>> > this: >>> > >>> > Create a second cohort in OpenMRS and then try again to download >>> > cohorts. >>> > After that, are you now able to select a cohort? At least the second >>> > cohort? >>> > >>> > If yes, now delete the second cohort from OpenMRS and then try to >>> > ensure you >>> > get the same problem as before. >>> > >>> > If yes, >>> > Look for: >>> > >>> > >>> > org.odk.clinic.android.activities.DownloadPatientActivity:createCohortDialog() >>> > >>> > and replace the line: >>> > >>> > int cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, -1); >>> > >>> > >>> > with something like: >>> > >>> > int cohortId = -1; >>> > try{ >>> > cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, >>> > -1); >>> > } >>> > catch(Exception ex){ >>> > //whatever...... >>> > } >>> > >>> > If all that works for you, then my suspicion is correct. >>> > >>> > >>> > >>> > On Fri, Mar 4, 2011 at 7:43 AM, Jesse Qualliotine wrote: >>> >> >>> >> Hi Yaw, >>> >> I have ODK Clinic, but I am not able to download my patients or >>> >> cohorts. >>> >> The server URL, username, and password are all correct, but when I >>> >> attempt >>> >> to download patients it fails. When I hit download patients, a >>> >> "select >>> >> cohort" menu pops up. If I select a cohort, the screen turns white >>> >> before I >>> >> can hit download and nothing happens (i.e. the circle on the right >>> >> does not >>> >> fill in green, indicating that I have selected the cohort because the >>> >> screen >>> >> turns white as soon as I tap any cohort). Is there something that I >>> >> am not >>> >> doing correctly? >>> >> Thanks, >>> >> Jesse >>> >> On Thu, Mar 3, 2011 at 10:54 PM, Yaw Anokwa wrote: >>> >>> >>> >>> hi jesse, >>> >>> >>> >>> try odk clinic. http://code.google.com/p/opendatakit/wiki/ODKClinic. >>> >>> the trunk version does form filling against openmrs. >>> >>> >>> >>> yaw >>> >>> >>> >>> On Thu, Mar 3, 2011 at 19:11, Jesse Qualliotine wrote: >>> >>> > Hi All, >>> >>> > >>> >>> > I'm trying to interface ODK Collect with the OpenMRS database, but >>> >>> > Collect always shows that there is no form to download. I think >>> >>> > that >>> >>> > this because of how OpenMRS outputs the formlist.xml file, which >>> >>> > doesn't show the URL of the forms (where to get them). Furthermore, >>> >>> > the formlist.xml outputted by OpenMRS presents a different >>> >>> > structure >>> >>> > from the one outputted by Aggregate. Does anyone know how I could >>> >>> > go >>> >>> > about solving this? >>> >>> > >>> >>> > Secondly, (and more importantly for me), I was able to copy the xml >>> >>> > forms in the app folder on the phone and fill them out, but cannot >>> >>> > send those results to OpenMRS. Collect prints out a "failed >>> >>> > transmission" error, but server name, username and password are >>> >>> > correct. Does anyone know how I could fix this? >>> >>> > >>> >>> > Thanks, >>> >>> > Jesse >>> >>> > >>> >>> > -- >>> >>> > Post: opendatakit@googlegroups.com >>> >>> > Unsubscribe: opendatakit+unsubscribe@googlegroups.com >>> >>> > Options: http://groups.google.com/group/opendatakit?hl=en >>> >>> > >>> >> >>> >> -- >>> >> Post: opendatakit@googlegroups.com >>> >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >>> >> Options: http://groups.google.com/group/opendatakit?hl=en >>> > >>> > >>> > >>> > -- >>> > If we keep uppermost in our minds the unkind and unjust acts of others, >>> > we >>> > shall find it impossible to love them as Christ has loved us; but if >>> > our >>> > thoughts dwell upon the wondrous love and pity of Christ for us, the >>> > same >>> > spirit will flow out to others. >>> > >> >> >> >> -- >> If we keep uppermost in our minds the unkind and unjust acts of others, we >> shall find it impossible to love them as Christ has loved us; but if our >> thoughts dwell upon the wondrous love and pity of Christ for us, the same >> spirit will flow out to others. > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >

Hi Jesse,
If you could follow Pau's suggestion and get a log of what happened before
the application crashed, it would help us immensely in figuring out what
went wrong.

As for the second question, ODK Clinic currently does not support adding
patients. You can only edit existing patients through form-filling. Yaw
should know more about whether this feature will be supported in later
versions.

Cheers,
James Hu

··· On Fri, Mar 4, 2011 at 11:05 AM, Pau Varela wrote:

Jesse,

regarding your first issue, try to plug the phone to your computer
and, assuming you have eclipse and ADB installed (otherwise, how could
you modify the code as suggested by Daniel), either try to see in the
LogCat view (Window > Show View > Other > Android > Logcat) which is
the exact error you are getting, or simply run

adb logcat

from your favourite command line

both options will give you a more detailed information about the error
and will help you to find out what's going on.

I hope it helps,

pau.

2011/3/4 Jesse Qualliotine jqualliotine@gmail.com:

Daniel,
You were exactly right. That issue is now solved and I am able to
download
patients. Thanks!
Unfortunately a new problem has arisen. I now am able to see all my
patients, but when I select any patient, the program freezes for ten
seconds, turns black for 20 seconds, then crashes with an error message:
"The application ODK Clinic (process org.odk.clinic.android) has stopped
unexpectedly. Please try Again." This happens for all my patients. Do
you
know what is causing this?
I also have another question in general. It seems to me that ODK clinic
allows one to visualize OpenMRS patient data and to edit data of existing
patients. I haven't found a way to add a new patient with ODK Clinic,
which
is crucial for field testing a medical device. Am I overlooking a way to
do
this? Also, I know that it was suggested that I try to work with ODK
Clinic
to edit OpenMRS patient data, but for my project I must send data via
bluetooth to phone, which automatically fills it into an XForm and
updates
the OpenMRS server. Are there still ongoing efforts to allow ODK Collect
to
communicate with oMRS? If not, what was the reason for not?
Thanks again,
Jesse
On Fri, Mar 4, 2011 at 10:17 AM, Daniel Kayiwa kayiwadaniel@gmail.com wrote:

Am suspecting that:

settings.getInt(PreferencesActivity.KEY_COHORT, -1);

could be failing in some way and throwing an exception which results
into

the code below it not executing leading to what she is getting.

On Fri, Mar 4, 2011 at 6:07 PM, Yaw Anokwa yanokwa@gmail.com wrote:

daniel,

what exactly is your suspicion?

yaw

On Fri, Mar 4, 2011 at 05:52, Daniel Kayiwa kayiwadaniel@gmail.com wrote:

Hi Jesse,

Am suspecting something but am not very sure until when you try doing
this:

Create a second cohort in OpenMRS and then try again to download
cohorts.
After that, are you now able to select a cohort? At least the second
cohort?

If yes, now delete the second cohort from OpenMRS and then try to
ensure you
get the same problem as before.

If yes,
Look for:

org.odk.clinic.android.activities.DownloadPatientActivity:createCohortDialog()

and replace the line:

int cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, -1);

with something like:

    int cohortId = -1;
    try{
        cohortId =

settings.getInt(PreferencesActivity.KEY_COHORT,

-1);
}
catch(Exception ex){
//whatever......
}

If all that works for you, then my suspicion is correct.

On Fri, Mar 4, 2011 at 7:43 AM, Jesse Qualliotine jqualliotine@gmail.com wrote:

Hi Yaw,
I have ODK Clinic, but I am not able to download my patients or
cohorts.
The server URL, username, and password are all correct, but when I
attempt
to download patients it fails. When I hit download patients, a
"select
cohort" menu pops up. If I select a cohort, the screen turns white
before I
can hit download and nothing happens (i.e. the circle on the right
does not
fill in green, indicating that I have selected the cohort because
the

screen
turns white as soon as I tap any cohort). Is there something that I
am not
doing correctly?
Thanks,
Jesse
On Thu, Mar 3, 2011 at 10:54 PM, Yaw Anokwa yanokwa@gmail.com wrote:

hi jesse,

try odk clinic.
http://code.google.com/p/opendatakit/wiki/ODKClinic.

the trunk version does form filling against openmrs.

yaw

On Thu, Mar 3, 2011 at 19:11, Jesse Qualliotine jqualliotine@gmail.com wrote:

Hi All,

I'm trying to interface ODK Collect with the OpenMRS database,
but

Collect always shows that there is no form to download. I think
that
this because of how OpenMRS outputs the formlist.xml file, which
doesn't show the URL of the forms (where to get them).
Furthermore,

the formlist.xml outputted by OpenMRS presents a different
structure
from the one outputted by Aggregate. Does anyone know how I
could

go
about solving this?

Secondly, (and more importantly for me), I was able to copy the
xml

forms in the app folder on the phone and fill them out, but
cannot

send those results to OpenMRS. Collect prints out a "failed
transmission" error, but server name, username and password are
correct. Does anyone know how I could fix this?

Thanks,
Jesse

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
If we keep uppermost in our minds the unkind and unjust acts of
others,

we
shall find it impossible to love them as Christ has loved us; but if
our
thoughts dwell upon the wondrous love and pity of Christ for us, the
same
spirit will flow out to others.

--
If we keep uppermost in our minds the unkind and unjust acts of others,
we

shall find it impossible to love them as Christ has loved us; but if our
thoughts dwell upon the wondrous love and pity of Christ for us, the
same

spirit will flow out to others.

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

adding new patients
we are working on a first pass. should have something to show by the
end of marchish. it'll basically be a blank form you fill out and send
to the server. there will be module that does some patient matching to
make sure it's really a new patient. if everything checks out, then
the patient will be added to the cohort.

connecting collect to openmrs
we have to ship the openrosa submission spec first, then the xforms
module will have to implement that spec. odk clinic bypasses this by
working directly with openmrs (in fairly standard, but not odk
standard way). you coul write an app that talks directly to openmrs
but still uses collect for the act of form form filling (clinic does
this). or you can modify your version of collect to send the data
directly to wherever (episurveyor on android does this).

··· On Sat, Mar 5, 2011 at 11:52, James Hu wrote: > Hi Jesse, > If you could follow Pau's suggestion and get a log of what happened before > the application crashed, it would help us immensely in figuring out what > went wrong. > As for the second question, ODK Clinic currently does not support adding > patients. You can only edit existing patients through form-filling. Yaw > should know more about whether this feature will be supported in later > versions. > > Cheers, > James Hu > On Fri, Mar 4, 2011 at 11:05 AM, Pau Varela wrote: >> >> Jesse, >> >> regarding your first issue, try to plug the phone to your computer >> and, assuming you have eclipse and ADB installed (otherwise, how could >> you modify the code as suggested by Daniel), either try to see in the >> LogCat view (Window > Show View > Other > Android > Logcat) which is >> the exact error you are getting, or simply run >> >> adb logcat >> >> from your favourite command line >> >> both options will give you a more detailed information about the error >> and will help you to find out what's going on. >> >> I hope it helps, >> >> pau. >> >> 2011/3/4 Jesse Qualliotine : >> > Daniel, >> > You were exactly right. That issue is now solved and I am able to >> > download >> > patients. Thanks! >> > Unfortunately a new problem has arisen. I now am able to see all my >> > patients, but when I select any patient, the program freezes for ten >> > seconds, turns black for 20 seconds, then crashes with an error message: >> > "The application ODK Clinic (process org.odk.clinic.android) has stopped >> > unexpectedly. Please try Again." This happens for all my patients. Do >> > you >> > know what is causing this? >> > I also have another question in general. It seems to me that ODK clinic >> > allows one to visualize OpenMRS patient data and to edit data of >> > existing >> > patients. I haven't found a way to add a new patient with ODK Clinic, >> > which >> > is crucial for field testing a medical device. Am I overlooking a way >> > to do >> > this? Also, I know that it was suggested that I try to work with ODK >> > Clinic >> > to edit OpenMRS patient data, but for my project I must send data via >> > bluetooth to phone, which automatically fills it into an XForm and >> > updates >> > the OpenMRS server. Are there still ongoing efforts to allow ODK >> > Collect to >> > communicate with oMRS? If not, what was the reason for not? >> > Thanks again, >> > Jesse >> > On Fri, Mar 4, 2011 at 10:17 AM, Daniel Kayiwa wrote: >> >> >> >> Am suspecting that: >> >> >> >> settings.getInt(PreferencesActivity.KEY_COHORT, -1); >> >> >> >> >> >> >> >> could be failing in some way and throwing an exception which results >> >> into >> >> the code below it not executing leading to what she is getting. >> >> >> >> >> >> On Fri, Mar 4, 2011 at 6:07 PM, Yaw Anokwa wrote: >> >>> >> >>> daniel, >> >>> >> >>> what exactly is your suspicion? >> >>> >> >>> yaw >> >>> >> >>> On Fri, Mar 4, 2011 at 05:52, Daniel Kayiwa wrote: >> >>> > >> >>> > Hi Jesse, >> >>> > >> >>> > Am suspecting something but am not very sure until when you try >> >>> > doing >> >>> > this: >> >>> > >> >>> > Create a second cohort in OpenMRS and then try again to download >> >>> > cohorts. >> >>> > After that, are you now able to select a cohort? At least the second >> >>> > cohort? >> >>> > >> >>> > If yes, now delete the second cohort from OpenMRS and then try to >> >>> > ensure you >> >>> > get the same problem as before. >> >>> > >> >>> > If yes, >> >>> > Look for: >> >>> > >> >>> > >> >>> > >> >>> > org.odk.clinic.android.activities.DownloadPatientActivity:createCohortDialog() >> >>> > >> >>> > and replace the line: >> >>> > >> >>> > int cohortId = settings.getInt(PreferencesActivity.KEY_COHORT, -1); >> >>> > >> >>> > >> >>> > with something like: >> >>> > >> >>> > int cohortId = -1; >> >>> > try{ >> >>> > cohortId = >> >>> > settings.getInt(PreferencesActivity.KEY_COHORT, >> >>> > -1); >> >>> > } >> >>> > catch(Exception ex){ >> >>> > //whatever...... >> >>> > } >> >>> > >> >>> > If all that works for you, then my suspicion is correct. >> >>> > >> >>> > >> >>> > >> >>> > On Fri, Mar 4, 2011 at 7:43 AM, Jesse Qualliotine wrote: >> >>> >> >> >>> >> Hi Yaw, >> >>> >> I have ODK Clinic, but I am not able to download my patients or >> >>> >> cohorts. >> >>> >> The server URL, username, and password are all correct, but when I >> >>> >> attempt >> >>> >> to download patients it fails. When I hit download patients, a >> >>> >> "select >> >>> >> cohort" menu pops up. If I select a cohort, the screen turns white >> >>> >> before I >> >>> >> can hit download and nothing happens (i.e. the circle on the right >> >>> >> does not >> >>> >> fill in green, indicating that I have selected the cohort because >> >>> >> the >> >>> >> screen >> >>> >> turns white as soon as I tap any cohort). Is there something that >> >>> >> I >> >>> >> am not >> >>> >> doing correctly? >> >>> >> Thanks, >> >>> >> Jesse >> >>> >> On Thu, Mar 3, 2011 at 10:54 PM, Yaw Anokwa wrote: >> >>> >>> >> >>> >>> hi jesse, >> >>> >>> >> >>> >>> try odk clinic. >> >>> >>> http://code.google.com/p/opendatakit/wiki/ODKClinic. >> >>> >>> the trunk version does form filling against openmrs. >> >>> >>> >> >>> >>> yaw >> >>> >>> >> >>> >>> On Thu, Mar 3, 2011 at 19:11, Jesse Qualliotine wrote: >> >>> >>> > Hi All, >> >>> >>> > >> >>> >>> > I'm trying to interface ODK Collect with the OpenMRS database, >> >>> >>> > but >> >>> >>> > Collect always shows that there is no form to download. I think >> >>> >>> > that >> >>> >>> > this because of how OpenMRS outputs the formlist.xml file, which >> >>> >>> > doesn't show the URL of the forms (where to get them). >> >>> >>> > Furthermore, >> >>> >>> > the formlist.xml outputted by OpenMRS presents a different >> >>> >>> > structure >> >>> >>> > from the one outputted by Aggregate. Does anyone know how I >> >>> >>> > could >> >>> >>> > go >> >>> >>> > about solving this? >> >>> >>> > >> >>> >>> > Secondly, (and more importantly for me), I was able to copy the >> >>> >>> > xml >> >>> >>> > forms in the app folder on the phone and fill them out, but >> >>> >>> > cannot >> >>> >>> > send those results to OpenMRS. Collect prints out a "failed >> >>> >>> > transmission" error, but server name, username and password are >> >>> >>> > correct. Does anyone know how I could fix this? >> >>> >>> > >> >>> >>> > Thanks, >> >>> >>> > Jesse >> >>> >>> > >> >>> >>> > -- >> >>> >>> > Post: opendatakit@googlegroups.com >> >>> >>> > Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> >>> >>> > Options: http://groups.google.com/group/opendatakit?hl=en >> >>> >>> > >> >>> >> >> >>> >> -- >> >>> >> Post: opendatakit@googlegroups.com >> >>> >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> >>> >> Options: http://groups.google.com/group/opendatakit?hl=en >> >>> > >> >>> > >> >>> > >> >>> > -- >> >>> > If we keep uppermost in our minds the unkind and unjust acts of >> >>> > others, >> >>> > we >> >>> > shall find it impossible to love them as Christ has loved us; but if >> >>> > our >> >>> > thoughts dwell upon the wondrous love and pity of Christ for us, the >> >>> > same >> >>> > spirit will flow out to others. >> >>> > >> >> >> >> >> >> >> >> -- >> >> If we keep uppermost in our minds the unkind and unjust acts of others, >> >> we >> >> shall find it impossible to love them as Christ has loved us; but if >> >> our >> >> thoughts dwell upon the wondrous love and pity of Christ for us, the >> >> same >> >> spirit will flow out to others. >> > >> > -- >> > Post: opendatakit@googlegroups.com >> > Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> > Options: http://groups.google.com/group/opendatakit?hl=en >> > >> >> -- >> Post: opendatakit@googlegroups.com >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >