django-survey icon indicating copy to clipboard operation
django-survey copied to clipboard

Questions groups or blocks

Open maximloginov opened this issue 2 years ago • 8 comments

I want to implement SF-36 Health Survey, some questions in this survey are grouped in blocks, for example, see questions 3-12 in https://rand.org/health-care/surveys_tools/mos/36-item-short-form/survey-instrument.html This group has a header and the same options for answers. Is it possible to implement this?

Basically, there are two questions:

  1. How to make a group header? e.g "The following items are about activities ... ?" in the example above.
  2. How to arrange the answers into a table?

maximloginov avatar Oct 27 '22 15:10 maximloginov

How to make a group header? e.g "The following items are about activities ... ?" in the example above.

That would be a category to create in django admin

How to arrange the answers into a table?

This would be a new feature.

Pierre-Sassoulas avatar Oct 27 '22 15:10 Pierre-Sassoulas

How to make a group header? e.g "The following items are about activities ... ?" in the example above. That would be a category to create in django admin

I tried that, but it does not look as a good solution. If I put question in category name, it is formatted as H3 element in view/html, it looks very different from other questions. Category description looks better, but the field in admin interface is too short for question text, therefore I decided its purpose is different. Also, category descrition does not support html tags like <strong> or <em> to emphasize some words in question...

How to arrange the answers into a table? This would be a new feature.

Right, and to me it looks like answers could be linked to header question, and all other "sub-questions" within the group inherit these answers.

maximloginov avatar Oct 27 '22 16:10 maximloginov

If I try to implement this using https://github.com/Sinkler/django-radiogrid would you include the additional dependency to django-survey? The project seems to be well-maintained and compatible different python/django versions.

maximloginov avatar Oct 30 '22 05:10 maximloginov

btw the issue #123 may be relevant to this one, @gjelsas could you confirm?

maximloginov avatar Oct 30 '22 05:10 maximloginov

If I try to implement this using https://github.com/Sinkler/django-radiogrid would you include the additional dependency to django-survey?

Sure, but let's make it an optional extra_require guarded with conditional in the code and documented in the readme. It's more work at first but I don't want / won't be able to deal with it if the dependency is not maintained anymore (and it seems like a small lib with less than 30 stars).

Pierre-Sassoulas avatar Oct 30 '22 05:10 Pierre-Sassoulas

btw the issue #123 may be relevant to this one, @gjelsas could you confirm?

Yes, Your suggestion would maybe be a way to implement that. Thanks!

gjelsas avatar Nov 11 '22 10:11 gjelsas

@maximloginov , @Pierre-Sassoulas : I'm (also) looking to implement a set of healthcare questionnaires. This radiobutton grouping would be very useful. So my questions:

  1. @Pierre-Sassoulas is this now implemented in django-survey? (Or do I need to work around this?)
  2. @maximloginov , do you have a working example that you can share/document/show the steps how you implemented it?

pkuppens avatar Jan 11 '23 22:01 pkuppens

I don't think so as this issue is still opened.

Pierre-Sassoulas avatar Jan 11 '23 22:01 Pierre-Sassoulas