In general, when you launch a questionnaire, the questionnaire will be passed the current user, patient and perhaps encounter.
Hmm ⌠this was a bit abstract, but I feel it might be because of thinking in different contexts with different assumptions about the environment this is all happening in. I tried skimming through some sections of the SDC guide to see what this meant in practice.
Our context is simply is that we have a product that mostly produces data that is just exported as RTF documents (unstructured data) meant for direct human consumption to a patient journal (EHR). We might need to support exporting as FHIR in the future. We have created form solutions ourselves up until now, but every new form demanded programmer time for creating the schema. When creating a new product that would also deal with patient forms we mostly settled on using FHIR Questionnaire for rendering in our frontend as that freed us from creating a proprietary form designer (could use an existing one) and a form schema language of our own.
So the initial thought is that we will mostly just be using FHIR as a data format for storing forms and their responses, with no (so far?) interlinked data to Observations, etc. I see that we might need to have a âFHIR APIâ to support the frontend dynamically looking up ValueSets referenced in the Questionnaire (like when it is unfeasible to manually create a list of thousands of of medications for use in a drop down list), but otherwise I would assume the need for sourcing data to be minimal.
Seeing that most existing form filler and/or rendering solutions for SPAs were gigantic multi-megabyte bundles with unflexible styling options, while we only saw the need for a quite limited set of components with highly custom rendering for both the input form and the resulting questionnaire response, we decided to create the form filler components needed to render the questionnaire and the responses in the SPAs ourselves.
So when I am thinking âlaunching a questionnaireâ I am thinking React (rendering) + JSON (the questionnaire) + Fetch (parse and process the questionnaire to fetch data based on metadata/expressions defined in the Questionnaire). But I assume this is a different (simpler/more concrete) context than you were thinking in
I assume that might be something like
- Give a url to a questionnaire to some FHIR library (HAPI, IBM FHIR Server, âŚ)
- Get a Questionnaire object back
- Invoke some FHIR lib magic to resolve (fetch) all the data referenced in the questionnaire
- Render that to user?
So given my context, what could âquestionnaire will be passed the current user, patient and perhaps encounterâ mean? What part of a Questionnaire definition would require a processor of the questionnaire to obtains a current user? And do you mean an actual FHIR Resource (like Practicioner)?