Say you have designed a Questionnaire
with an item
of the open-choice
where you are to choose which medications you are taking for your illness. To satisfy business requirements, this list may be compromised of thousands of choices, validating some custom front-end component to handle rendering and user-input in these cases. I guess telling the frontend that this Questionnaire.item
is of the really-long-variety
to make it employ special rendering could be done through some kind of extension, but I am not sure about the data part:
I see two main paths for the answerValueSet
- Define the set as a static part of the questionnaire, either as a long list of values in
answerValueSet
or maybe through some kind of embedded resource that is referenced? Not sure how to do the latter, if supported, and if possible to validate in some easy manner. - Somehow make it dynamic - fetching it from some endpoint in the client
Is the latter possible (i.e. adding some extension that tells the client “this data can be fetched from http://my.server/medications/for/illness”)? I guess this makes would make validation a bit tricky, if the backend was to compare any code received in the questionnaire response with that of a dynamic endpoint, whose output could change in time.
The first option seems quite straight forward, but would bloat the documents considerably, unless I could somehow reference some external FHIR resource, like /fhir/Basic/772123
that would have it. Is this possible (and works with validation)?