Correlating an Xform instance on collect with database row in aggregate

Hi everyone, we have been doing some work with ODK Collect and Aggregate and
had a quick question we hope someone can answer. Is there any way to
correlate a xform instance on ODK collect with the corresponding row in the
database in ODK Aggregate? After an initial review, there doesn't seem to be
a way to do this, but just wanted to verify with others before we proceed

Thanks

there is no instance uuid if that's what you are looking for. we've
been talking about adding it for some time...i think the javarosa-core
even has a reasonable first pass at something like that. what broader
problem are you trying to solve?

··· On Thu, Aug 11, 2011 at 08:27, David Roberge wrote: > Hi everyone, we have been doing some work with ODK Collect and Aggregate and > had a quick question we hope someone can answer. Is there any way to > correlate a xform instance on ODK collect with the corresponding row in the > database in ODK Aggregate? After an initial review, there doesn't seem to be > a way to do this, but just wanted to verify with others before we proceed > Thanks

Hi Yaw, thanks for the quick response.

We are actually trying to integrate an added level of validation that cannot
be expressed through the XForm standard.

Our current workflow is:

  • Submit XForm instances from ODK Collect to ODK Aggregate
  • Configure a JSON External Service for each of the form definitions to
    submit the form instance to a health application with ODK Aggregate
  • The health application extracts data from the form definition, inserting a
    record if valid, otherwise flagging it as invalid.
  • ODK Collect makes request to health application to determine which form
    instances have been validated and which have not.
  • If an instance is invalid, mark it as not complete so user can make
    necessary changes and resubmit.

We ran into issues because ODK Collect is talking directly to the health
application and there is no way to get those Id's from Aggregate.

Any ideas on the best way to proceed? Or suggestions on improving our
workflow?

Thanks again

··· On Thu, Aug 11, 2011 at 11:29 AM, Yaw Anokwa wrote:

there is no instance uuid if that's what you are looking for. we've
been talking about adding it for some time...i think the javarosa-core
even has a reasonable first pass at something like that. what broader
problem are you trying to solve?

On Thu, Aug 11, 2011 at 08:27, David Roberge david.roberge@maine.edu wrote:

Hi everyone, we have been doing some work with ODK Collect and Aggregate
and
had a quick question we hope someone can answer. Is there any way to
correlate a xform instance on ODK collect with the corresponding row in
the
database in ODK Aggregate? After an initial review, there doesn't seem to
be
a way to do this, but just wanted to verify with others before we proceed
Thanks

Hello I am new to ODK and currently I implementing a custome aggregate. I have face a wall on the Authentication part of the client request. I will appreciate if you could provide with sample implementation code. I am implementing the agregate in Java.

Thanks

ODK Aggregate 1.0 uses whatever you put in the first
tag in your form data as the meta-instance-id
of that submission within Aggregate's data store.

Since we allow any xmlns for these tags, this is a relaxation of the
OpenRosa Metadata schema detailed here:
https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaMetaDataSchema which
required these to be in the "http://openrosa.org/xforms/metadata" xmlns.

I.e., you should just be able to do:

<h:head>
<h:title>My Form Name</h:title>








....


....

with suitable preload binds to populate these fields.

Mitch

··· On Thu, Aug 11, 2011 at 8:46 AM, David Roberge wrote:

Hi Yaw, thanks for the quick response.

We are actually trying to integrate an added level of validation that
cannot be expressed through the XForm standard.

Our current workflow is:

  • Submit XForm instances from ODK Collect to ODK Aggregate
  • Configure a JSON External Service for each of the form definitions to
    submit the form instance to a health application with ODK Aggregate
  • The health application extracts data from the form definition, inserting
    a record if valid, otherwise flagging it as invalid.
  • ODK Collect makes request to health application to determine which form
    instances have been validated and which have not.
  • If an instance is invalid, mark it as not complete so user can make
    necessary changes and resubmit.

We ran into issues because ODK Collect is talking directly to the health
application and there is no way to get those Id's from Aggregate.

Any ideas on the best way to proceed? Or suggestions on improving our
workflow?

Thanks again

On Thu, Aug 11, 2011 at 11:29 AM, Yaw Anokwa yanokwa@gmail.com wrote:

there is no instance uuid if that's what you are looking for. we've
been talking about adding it for some time...i think the javarosa-core
even has a reasonable first pass at something like that. what broader
problem are you trying to solve?

On Thu, Aug 11, 2011 at 08:27, David Roberge david.roberge@maine.edu wrote:

Hi everyone, we have been doing some work with ODK Collect and Aggregate
and
had a quick question we hope someone can answer. Is there any way to
correlate a xform instance on ODK collect with the corresponding row in
the
database in ODK Aggregate? After an initial review, there doesn't seem
to be
a way to do this, but just wanted to verify with others before we
proceed
Thanks

--
Mitch Sundt
Software Engineer
http://www.OpenDataKit.org
University of Washington
mitchellsundt@gmail.com

Hi Mitch, thanks for the reply. I think this is exactly what we are looking
for. Do you happen to know when this was introduced? Is this a recent
change, or has it been there for awhile?

··· On Thu, Aug 11, 2011 at 2:57 PM, Mitch Sundt wrote:

ODK Aggregate 1.0 uses whatever you put in the first
tag in your form data as the meta-instance-id
of that submission within Aggregate's data store.

Since we allow any xmlns for these tags, this is a relaxation of the
OpenRosa Metadata schema detailed here:
https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaMetaDataSchema which
required these to be in the "http://openrosa.org/xforms/metadata" xmlns.

I.e., you should just be able to do:

<h:head>
<h:title>My Form Name</h:title>








....


....

with suitable preload binds to populate these fields.

Mitch

On Thu, Aug 11, 2011 at 8:46 AM, David Roberge david.roberge@maine.eduwrote:

Hi Yaw, thanks for the quick response.

We are actually trying to integrate an added level of validation that
cannot be expressed through the XForm standard.

Our current workflow is:

  • Submit XForm instances from ODK Collect to ODK Aggregate
  • Configure a JSON External Service for each of the form definitions to
    submit the form instance to a health application with ODK Aggregate
  • The health application extracts data from the form definition, inserting
    a record if valid, otherwise flagging it as invalid.
  • ODK Collect makes request to health application to determine which form
    instances have been validated and which have not.
  • If an instance is invalid, mark it as not complete so user can make
    necessary changes and resubmit.

We ran into issues because ODK Collect is talking directly to the health
application and there is no way to get those Id's from Aggregate.

Any ideas on the best way to proceed? Or suggestions on improving our
workflow?

Thanks again

On Thu, Aug 11, 2011 at 11:29 AM, Yaw Anokwa yanokwa@gmail.com wrote:

there is no instance uuid if that's what you are looking for. we've
been talking about adding it for some time...i think the javarosa-core
even has a reasonable first pass at something like that. what broader
problem are you trying to solve?

On Thu, Aug 11, 2011 at 08:27, David Roberge david.roberge@maine.edu wrote:

Hi everyone, we have been doing some work with ODK Collect and
Aggregate and
had a quick question we hope someone can answer. Is there any way to
correlate a xform instance on ODK collect with the corresponding row in
the
database in ODK Aggregate? After an initial review, there doesn't seem
to be
a way to do this, but just wanted to verify with others before we
proceed
Thanks

--
Mitch Sundt
Software Engineer
http://www.OpenDataKit.org
University of Washington
mitchellsundt@gmail.com

It arrived with Beta 3 -- first item on the changelist
http://code.google.com/p/opendatakit/wiki/AggregateReleaseNotes#Changelist

July 5th check-in to uiexperiment branch
http://code.google.com/p/opendatakit/source/detail?r=9c4e8af52b8e050454bf759606ced907fd03b18f&name=v1_0&repo=aggregate
(I believe there was a bug fix after that, though).

Mitch

··· On Thu, Aug 11, 2011 at 1:43 PM, David Roberge wrote:

Hi Mitch, thanks for the reply. I think this is exactly what we are looking
for. Do you happen to know when this was introduced? Is this a recent
change, or has it been there for awhile?

On Thu, Aug 11, 2011 at 2:57 PM, Mitch Sundt msundt@cs.washington.eduwrote:

ODK Aggregate 1.0 uses whatever you put in the first
tag in your form data as the meta-instance-id
of that submission within Aggregate's data store.

Since we allow any xmlns for these tags, this is a relaxation of the
OpenRosa Metadata schema detailed here:
https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaMetaDataSchema which
required these to be in the "http://openrosa.org/xforms/metadata" xmlns.

I.e., you should just be able to do:

<h:head>
<h:title>My Form Name</h:title>








....


....

with suitable preload binds to populate these fields.

Mitch

On Thu, Aug 11, 2011 at 8:46 AM, David Roberge david.roberge@maine.eduwrote:

Hi Yaw, thanks for the quick response.

We are actually trying to integrate an added level of validation that
cannot be expressed through the XForm standard.

Our current workflow is:

  • Submit XForm instances from ODK Collect to ODK Aggregate
  • Configure a JSON External Service for each of the form definitions to
    submit the form instance to a health application with ODK Aggregate
  • The health application extracts data from the form definition,
    inserting a record if valid, otherwise flagging it as invalid.
  • ODK Collect makes request to health application to determine which form
    instances have been validated and which have not.
  • If an instance is invalid, mark it as not complete so user can make
    necessary changes and resubmit.

We ran into issues because ODK Collect is talking directly to the health
application and there is no way to get those Id's from Aggregate.

Any ideas on the best way to proceed? Or suggestions on improving our
workflow?

Thanks again

On Thu, Aug 11, 2011 at 11:29 AM, Yaw Anokwa yanokwa@gmail.com wrote:

there is no instance uuid if that's what you are looking for. we've
been talking about adding it for some time...i think the javarosa-core
even has a reasonable first pass at something like that. what broader
problem are you trying to solve?

On Thu, Aug 11, 2011 at 08:27, David Roberge david.roberge@maine.edu wrote:

Hi everyone, we have been doing some work with ODK Collect and
Aggregate and
had a quick question we hope someone can answer. Is there any way to
correlate a xform instance on ODK collect with the corresponding row
in the
database in ODK Aggregate? After an initial review, there doesn't seem
to be
a way to do this, but just wanted to verify with others before we
proceed
Thanks

--
Mitch Sundt
Software Engineer
http://www.OpenDataKit.org
University of Washington
mitchellsundt@gmail.com

--
Mitch Sundt
Software Engineer
http://www.OpenDataKit.org
University of Washington
mitchellsundt@gmail.com