Stream: questionnaire
Topic: GCS: Field value restriction
Vedant Parikh (Apr 21 2021 at 13:50):
Hi guys,
I am working on implementing a questionnaire for Glasgow Coma Scale (GCS). While defining a profile for the same, I have integer values for the calculation of the scale. In that I want to limit the value for the fields (for example: Eye opening, Verbal response and Motor response). To limit these values I have a code in place for ex: answerOption[+].valueInteger = 1.
Now while validation of the profile, the response from fhir does not throw error even for values out of the defined limits. Is there a way restrict the values and perform validation for profiles?
Any help would be greatly appreciated. Thanks :)
Lloyd McKenzie (Apr 21 2021 at 15:04):
Typically for GCS, the answers should be Codings, not integers. You'd use the 'coded ordinal' extension to capture their integer values. The allowed list of codes would be constrained as option choices for the questionnaire. (There are extensions to allow you to set min and max for truly numeric answers.)
Paul Lynch (Apr 21 2021 at 15:11):
BTW, The GCS exists as a LOINC panel, which you can get at https://fhir.loinc.org/Questionnaire/35088-4. It will ask you for a login, but accounts are free and and you can get one at https://loinc.org/join/ .
I think Lloyd is referring to the https://www.hl7.org/fhir/extension-ordinalvalue.html extension.
Tilo Christ (Apr 21 2021 at 16:19):
@Vedant Parikh I think the fastest way to accomplish what you are looking for is to go to https://lhcformbuilder.nlm.nih.gov , hit the "Add Item" button, click "Panel", enter 35088-4. Hit Import. Save the questionnaire.
Vedant Parikh (Apr 21 2021 at 17:33):
Hi guys,
Thank you very much for your inputs. My question is not specifically/limited to GCS.
The ‘answerOption’ inherently should generate an error code(it should restrict input values other than defined) if the input values do not match any of the defined answer options. Could you please let me know if my assumption is wrong or why an error is not thrown for an input which is not defined.
Paul Lynch (Apr 21 2021 at 20:34):
If you set the item.type to "choice", the user will have to select one of the codings provided. They won't be able to enter something off the list.
Vedant Parikh (Apr 22 2021 at 09:03):
@Paul Lynch Thank you for your suggestion It has solved my problem. :big_smile:
Last updated: Apr 12 2022 at 19:14 UTC