Decision tree in ODK

How are you all?
I am new to ODK. I want to develop a simple decision support system on
the top of ODK. I have heard about the support of decision tree in
ODK. Where can I get more information about it? that is about how I
can develop the decision tree so that it will work with ODK.

Thank you in advance.

andu

http://opendatakit.org/help/form-design/ has a lot of detail about how
to design forms, please start there.

··· On Fri, Nov 25, 2011 at 02:05, andu wrote: > How are you all? > I am new to ODK. I want to develop a simple decision support system on > the top of ODK. I have heard about the support of decision tree in > ODK. Where can I get more information about it? that is about how I > can develop the decision tree so that it will work with ODK. > > Thank you in advance. > > andu > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >

Hello!

Thank you for your response. I have seen the link you provide me. But
as far as I can see, it is about designing xform. I have seen that
forms can be designed with xform with some branching. What I have
planned to develop is to represent decision rule in some format (can
be XML) so that it will work with ODK/Xform. Does feature of branching
in Xform help me to do what I have planned? Is there any other thing
that may help me?

thank you in advance.

Andu.

··· On 25 nov, 17:25, Yaw Anokwa wrote: > http://opendatakit.org/help/form-design/has a lot of detail about how > to design forms, please start there. > > > > > > > > On Fri, Nov 25, 2011 at 02:05, andu wrote: > > How are you all? > > I am new to ODK. I want to develop a simple decision support system on > > the top of ODK. I have heard about the support of decision tree in > > ODK. Where can I get more information about it? that is about how I > > can develop the decision tree so that it will work with ODK. > > > Thank you in advance. > > > andu > > > -- > > Post: opendatakit@googlegroups.com > > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > > Options:http://groups.google.com/group/opendatakit?hl=en

Hi Andu,

··· On Sun, 27 Nov 2011, andu wrote:

Thank you for your response. I have seen the link you provide me. But as
far as I can see, it is about designing xform. I have seen that forms
can be designed with xform with some branching. What I have planned to
develop is to represent decision rule in some format (can be XML) so
that it will work with ODK/Xform. Does feature of branching in Xform
help me to do what I have planned? Is there any other thing that may
help me?

The important points are:

  1. ODK is still under development and has bugs. You should be prepared to
    fix them yourself, or pay a programmer to do it for you, if you want a
    finished product in reasonable time. Please submit the fixes back to the
    project so that everyone else can benefit from them. (I hope that nobody
    is offended by this statement; it's true of all non-commercial open source
    projects; and even commercial ones if you don't have a support contract
    with someone).

  2. ODK Collect is NOT DESIGNED to be a decision tree system. You can make
    it do it, but expect to work hard, learn some of the XForms spec, and find
    answers to things yourself.

  3. Each question has a multiple-choice answer, for example:

      <group 
    

ref="/root/P4_drinking_water_group">
Source of drinking water

What is the main source of drinking water now?

Direct from the river/lake/stream/dam
1_direct_from_source


Unprotected well
2_unprotected_well

...

  1. The questions that depend on particular answers are enabled or disabled
    by a relevancy test. For example, the question (or group) that depends on
    choosing 1_direct_from_source in response to the question above, would
    have a relevancy value like this:

If the question was not asked, because it was itself irrelevant (due to a
question leading to it having been answered in a way that directs the user
away from that question), then the "selected()" test is false and the
dependent question (P4_some_other_question) is never asked either.

  1. If you want to display the path to the current question at the top of
    the page, embed the questions into nested groups ( elements) whose
    tree structure represents the question tree. If you don't want to display
    the path, flatten the tree structure. Either way works, it makes no
    functional difference.

  2. Don't try to display master and child questions on the same page using
    a field-list, it doesn't work (the visibility of the child is not updated
    when the master question is answered).

Cheers, Chris.

Aptivate | http://www.aptivate.org | Phone: +44 1223 760887
The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.

Dear Chris,

Thank you very much for the detail information you provide me.

best regards,

Andu

··· On Nov 27, 5:55 pm, Chris Wilson wrote: > Hi Andu, > > On Sun, 27 Nov 2011, andu wrote: > > Thank you for your response. I have seen the link you provide me. But as > > far as I can see, it is about designing xform. I have seen that forms > > can be designed with xform with some branching. What I have planned to > > develop is to represent decision rule in some format (can be XML) so > > that it will work with ODK/Xform. Does feature of branching in Xform > > help me to do what I have planned? Is there any other thing that may > > help me? > > The important points are: > > 0. ODK is still under development and has bugs. You should be prepared to > fix them yourself, or pay a programmer to do it for you, if you want a > finished product in reasonable time. Please submit the fixes back to the > project so that everyone else can benefit from them. (I hope that nobody > is offended by this statement; it's true of all non-commercial open source > projects; and even commercial ones if you don't have a support contract > with someone). > > 1. ODK Collect is NOT DESIGNED to be a decision tree system. You can make > it do it, but expect to work hard, learn some of the XForms spec, and find > answers to things yourself. > > 2. Each question has a multiple-choice answer, for example: > > ref="/root/P4_drinking_water_group"> > Source of drinking water > ref="/root/P4_drinking_water_group/P4_drinking_water_source"> > What is the main source of drinking water now? > > Direct from the river/lake/stream/dam > 1_direct_from_source > > > Unprotected well > 2_unprotected_well > > ... > > 3. The questions that depend on particular answers are enabled or disabled > by a relevancy test. For example, the question (or group) that depends on > choosing 1_direct_from_source in response to the question above, would > have a relevancy value like this: > > nodeset="/root/P4_drinking_water_group/P4_some_other_question" > relevant="selected(/root/P4_drinking_water_group/P4_drinking_water_source, > '1_direct_from_source')" required="true()" type="string"/> > > If the question was not asked, because it was itself irrelevant (due to a > question leading to it having been answered in a way that directs the user > away from that question), then the "selected()" test is false and the > dependent question (P4_some_other_question) is never asked either. > > 4. If you want to display the path to the current question at the top of > the page, embed the questions into nested groups ( elements) whose > tree structure represents the question tree. If you don't want to display > the path, flatten the tree structure. Either way works, it makes no > functional difference. > > 5. Don't try to display master and child questions on the same page using > a field-list, it doesn't work (the visibility of the child is not updated > when the master question is answered). > > Cheers, Chris. > -- > Aptivate |http://www.aptivate.org| Phone: +44 1223 760887 > The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES > > Aptivate is a not-for-profit company registered in England and Wales > with company number 04980791.

i agree with much of what chris said.

depending on how complex your protocol is, you can use xforms -- see
the eimci form at
http://code.google.com/p/opendatakit/source/browse/eIMCI.xml?repo=forms&r=755c69b398716e392ec6b795cd354435783e9199
to get a sense of what xforms can do.

we do try to fix bugs the community reports (at least in trunk)
quickly. feature requests are another beast -- those we do when we get
time, and so hiring a developer is the best approach if you need
something added to odk quickly.

··· On Mon, Nov 28, 2011 at 03:26, andu wrote: > Dear Chris, > > Thank you very much for the detail information you provide me. > > > best regards, > > Andu > > On Nov 27, 5:55 pm, Chris Wilson wrote: >> Hi Andu, >> >> On Sun, 27 Nov 2011, andu wrote: >> > Thank you for your response. I have seen the link you provide me. But as >> > far as I can see, it is about designing xform. I have seen that forms >> > can be designed with xform with some branching. What I have planned to >> > develop is to represent decision rule in some format (can be XML) so >> > that it will work with ODK/Xform. Does feature of branching in Xform >> > help me to do what I have planned? Is there any other thing that may >> > help me? >> >> The important points are: >> >> 0. ODK is still under development and has bugs. You should be prepared to >> fix them yourself, or pay a programmer to do it for you, if you want a >> finished product in reasonable time. Please submit the fixes back to the >> project so that everyone else can benefit from them. (I hope that nobody >> is offended by this statement; it's true of all non-commercial open source >> projects; and even commercial ones if you don't have a support contract >> with someone). >> >> 1. ODK Collect is NOT DESIGNED to be a decision tree system. You can make >> it do it, but expect to work hard, learn some of the XForms spec, and find >> answers to things yourself. >> >> 2. Each question has a multiple-choice answer, for example: >> >> > ref="/root/P4_drinking_water_group"> >> Source of drinking water >> > ref="/root/P4_drinking_water_group/P4_drinking_water_source"> >> What is the main source of drinking water now? >> >> Direct from the river/lake/stream/dam >> 1_direct_from_source >> >> >> Unprotected well >> 2_unprotected_well >> >> ... >> >> 3. The questions that depend on particular answers are enabled or disabled >> by a relevancy test. For example, the question (or group) that depends on >> choosing 1_direct_from_source in response to the question above, would >> have a relevancy value like this: >> >> > nodeset="/root/P4_drinking_water_group/P4_some_other_question" >> relevant="selected(/root/P4_drinking_water_group/P4_drinking_water_source, >> '1_direct_from_source')" required="true()" type="string"/> >> >> If the question was not asked, because it was itself irrelevant (due to a >> question leading to it having been answered in a way that directs the user >> away from that question), then the "selected()" test is false and the >> dependent question (P4_some_other_question) is never asked either. >> >> 4. If you want to display the path to the current question at the top of >> the page, embed the questions into nested groups ( elements) whose >> tree structure represents the question tree. If you don't want to display >> the path, flatten the tree structure. Either way works, it makes no >> functional difference. >> >> 5. Don't try to display master and child questions on the same page using >> a field-list, it doesn't work (the visibility of the child is not updated >> when the master question is answered). >> >> Cheers, Chris. >> -- >> Aptivate |http://www.aptivate.org| Phone: +44 1223 760887 >> The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES >> >> Aptivate is a not-for-profit company registered in England and Wales >> with company number 04980791. > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en >