I need to increase the answer code length

Mehr
1 Jahr 5 Monate her - 1 Jahr 5 Monate her #155832 von guillem
guillem erstellte das Thema I need to increase the answer code length
Dear Community,

For a research project I need to reuse some standardized codes (SNOMED CT & Health Care Provider Taxonomy Codes) as answer codes.

Our hospital IT department says that this is not possible with limesurvey because only 5 alphanumeric characters are allowed and we need 10…

How easy (or difficult) is it to hack our limesurvey platform (2.05 version) to increase the answer code length?


Thank you for your help

Guillem
Letzte Änderung: 1 Jahr 5 Monate her von guillem.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Jahr 5 Monate her - 1 Jahr 5 Monate her #155838 von Ben_V
Ben_V antwortete auf das Thema: I need to increase the answer code length
Hi Guillem,

I wonder if we can expect some good news about this limit in the coming soon LS 3 version… :unsure:

Actually this is an old -undervalued- well known issue and you can find in this forum some other related posts, mainly written when the possibility to use underscores was removed (allowed until LS 2.00 version). FYI, I personally started the following discussion in the french forum (considering your first name I suppose you are Catalan and likely able to understand french, right ?):
=> www.limesurvey.org/community/forums/fren...nde-interopérabilité

This 5 chars limit is in my opinion critical for (growing) users needing to work with standardized codes, references, >5 chars zip codes (like India), etc. (on the other hand, I think that not allowing underscore is nowadays not critical since big standards don't use it anymore.)

I can't really answer your question but I guess it should be tricky to hack LS core code for this purpose. If you really have to handle SNOMED & NUCC as answer codes, you should consider to use REDCaP for your study...

Edit: I'm not sure if increasing VARCHAR(5) in the db have unwanted effects or not but you can try as proposed here:
bugs.limesurvey.org/view.php?id=7593

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Letzte Änderung: 1 Jahr 5 Monate her von Ben_V.
Folgende Benutzer bedankten sich: guillem

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Jahr 5 Monate her #155846 von Ben_V
Ben_V antwortete auf das Thema: I need to increase the answer code length
If want to do give this some try, install a new instance ( github.com/LimeSurvey/LimeSurvey/tree/2.06lts ) and try the following after replacing values by your new code length


1) Update "varchar(5)" 'code' column in 'lime_answers' & 'lime labels' tables

2) Update application/models/Answer.php (#79)
array('code','length', 'min' => 1, 'max'=>5),

3) Update application/views/admin/labels/labelview_view.php (#75)
maxlength='5' size='6'

4) Update application/views/admin/survey/Question/answerOptions_view.php (lines #98 & #113)
maxlength='5' size='5'


Test the more you can... &give us some feedbacks ;)

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Folgende Benutzer bedankten sich: guillem

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Jahr 5 Monate her #155859 von guillem
guillem antwortete auf das Thema: I need to increase the answer code length
Nice! We will give this a serious try in the next few days and let you know :)

Thank you very much!

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Jahr 5 Monate her - 1 Jahr 5 Monate her #155928 von Ben_V
Ben_V antwortete auf das Thema: I need to increase the answer code length

1) Update "varchar(5)" 'code' column in 'lime_answers' & 'lime labels' tables

2) Update application/models/Answer.php (#79)

array('code','length', 'min' => 1, 'max'=>5),

3) Update application/views/admin/labels/labelview_view.php (#75)
maxlength='5' size='6'

4) Update application/views/admin/survey/Question/answerOptions_view.php (lines #98 & #113)
maxlength='5' size='5'



SQL code for 1) (15 chars) :
ALTER TABLE `lime_answers` CHANGE `code` `code` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
ALTER TABLE `lime_labels` CHANGE `code` `code` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';

The last but not the least:
5) Edit application/helpers/admin/activate_helper.php (#313 #385 #388)
string(5)

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Letzte Änderung: 1 Jahr 5 Monate her von Ben_V.
Folgende Benutzer bedankten sich: guillem

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Jahr 5 Monate her - 1 Jahr 5 Monate her #155930 von tammo
tammo antwortete auf das Thema: I need to increase the answer code length
Isn't this very dangerous, since when updating possibly one (disastrous!), multiple (also disastrous) or all these modified files may be overwritten?

Shouldn't this be sent to the developers either as a change request, and when it is very important, with some money or as a well documented Pull Request?

Tammo


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template
Letzte Änderung: 1 Jahr 5 Monate her von tammo.
Folgende Benutzer bedankten sich: Ben_V, guillem

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Jahr 5 Monate her - 1 Jahr 5 Monate her #155934 von Ben_V
Ben_V antwortete auf das Thema: I need to increase the answer code length
Hi Tammo,

tammo schrieb: Isn't this very dangerous, since when updating possibly one (disastrous!), multiple (also disastrous) or all these modified files may be overwritten?

As you already know, GNU GPL licensed softwares allow to adapt the code to fit all your needs, so it's easy to understand that you can't get everything (huge customization + keep receiving standard updates from the master branch)
This said you're 100% right; This have to be said and said again:
Do not apply any standard actualization to customized installations except if you know exactly what you are updating. Always write down all your critical changes and backup db & files.

tammo schrieb: Shouldn't this be sent to the developers either as a change request, and when it is very important, with some money or as a well documented Pull Request?

I'm sorry but I'm not really sure about how answer your question for the following key reasons:

1) We are not exactly talking about a new feature but about the dev team agreement to increase a critical value (sounds easy but possible side effects).
2) This limit is well known; there are some existing (old & recent) related entries in the forum & feature(s) request(s)
Additionally you may find a clear allusion included in Tom's todo list (around 2012).
manual.limesurvey.org/User:TMSWhite

TMSWhite schrieb: At present, the main features which still need to be ported include:

  • new tables to support item banking and standardization of items using LOINC and SNOMED


Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Letzte Änderung: 1 Jahr 5 Monate her von Ben_V.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Jahr 5 Monate her #155951 von guillem
guillem antwortete auf das Thema: I need to increase the answer code length
First thanks to all the people contributing to this fabulous software…

I understand perfectly that limesurvey was originally made for surveys and not for building databases requiring strict codification in a research environment like Redcap does.

Fortunately, Ben's words (and good 1st feedback from our IT Dept.) make me think that everything is possible. Skipping updates it's not very critical when you can fulfill major requirements.

When I say that everything is possible, this of course depends on your technical skills and available time. Without IT support, I will probably have to give up with limesurvey, so it will be a really great enhancement if there is, in a near future, a significant increase of answer codes length (or a setting for this).
Unfortunately, when working with standardized codification, 5 allowed characters is pretty nothing and limesurvey almost useless. In other words, why should I invent a dirty new 5 chars code for "Behavioral neurology & neuropsychiatry" medical subspecialty when "2084B0040X" is used all over the (open data) world, where more and more, everything have to be properly labeled and interoperable.

Thanks again,

Guillem

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Jahr 5 Monate her - 1 Jahr 5 Monate her #155977 von Ben_V
Ben_V antwortete auf das Thema: I need to increase the answer code length

guillem schrieb: [...]everything have to be properly labeled and interoperable.


No worries... trust in your annotation team :laugh:

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Anhang:
Letzte Änderung: 1 Jahr 5 Monate her von Ben_V.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Jahr 4 Monate her #156048 von Ben_V
Ben_V antwortete auf das Thema: I need to increase the answer code length
FYI, just added a note here:

bugs.limesurvey.org/view.php?id=7593

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha