views:

15

answers:

1

Hello,

I was wondering how I could make a questionnaire that asks an initial question, and the following questions are based on how you answered the first questions? For example (this is for a Chiropractic clinic)

Where is the area of pain located? 1.) Head 2.) Back 3.) Shoulder

If the person answered (1), then the next question would ask if it is a headache, earache and so on. Likewise, if the person answered (2), the next question would be different, asking if it was on your upper, middle or lower back. So every question that follows your answer is completely relative to how you answered it. There is no right or wrong answer. This would be used to easily diagnose the patients problems, and be much more effiecient than using paper. If anyone can help me out, I would appreciate it very much! I have never programmed any software whatsoever, but I am a quick learner and would be willing to learn, simply for this purpose. Thanks in advance!

+1  A: 

You are interested in a tree structure where the child selected is based on the answer key.

For example:

               (//Answer:0:ROOT NODE)
               (\\Question:Where is the area of pain located?)
               /                           |                 \
(//Answer:0:Head)                 (//Answer:1:Back)        (//Answer:2:Shoulder)
(\\Question:Earache or headache)  (\\Question:???)         (\\Question:???)
  /          \                     /            \           /            \    
(//A:0:Ear)  (//A:1:Head)        (//A:0)    (//A:1)       (//A:0)    (//A:1)
(\\Q:?)      (\\Q:?)             (\\Q:?)    (\\Q:?)       (\\Q:?)    (\\Q:?)
M2tM