FHIR Chat · string vs. text as question type · questionnaire

Stream: questionnaire

Topic: string vs. text as question type


view this post on Zulip Morten Ernebjerg (Jun 25 2020 at 08:59):

In Questionnaire.item.type, one can use both"string" and "text" to indicate free text, but both correspond to valueString in the answer. The documentation says the former is a "few words to short sentence" while the latter is "potentially multi-paragraph". Is the choice of one vs. the other mainly meant as a hint to the UI or does it have "hard consequences" on validity etc. - e.g. are different length restriction applied during validation of a QuestionnaireResponse?

view this post on Zulip Grahame Grieve (Jun 25 2020 at 10:23):

UI as far as I know

view this post on Zulip Brian Postlethwaite (Jun 25 2020 at 11:16):

Yes, it's a UI hint.

view this post on Zulip Brian Postlethwaite (Jun 25 2020 at 11:18):

Just like open-choice can be a string or coding, doesn't dictate how the ui should do it.

view this post on Zulip Grahame Grieve (Jun 25 2020 at 12:00):

I guess in the validator I would put a warning on a string value that contains eoln characters

view this post on Zulip Morten Ernebjerg (Jun 25 2020 at 12:49):

OK thanks! - I'll bring out item.maxLength then.

view this post on Zulip Brian Postlethwaite (Mar 24 2022 at 21:20):

Should there be some validation on the string type answers to ensure that the value does not contain \r or \n values.

view this post on Zulip Brian Postlethwaite (Mar 24 2022 at 21:21):

Also, should the open-choice be a string or text type - in validating (the \r\n stuff)


Last updated: Apr 12 2022 at 19:14 UTC