type: sdc-pagesource: sdc/input/pagecontent/OperationDefinition-Questionnaire-assemble-notes.xml
SDC: OperationDefinition-Questionnaire-assemble-notes
Algorithm
The assembly process for a modular questionnaire proceeds as follows:
- Resolve all subQuestionnaire extensions as described in the Modular Forms page. If there is an issue resolving any of the subQuestionnaires or applying the reolution process results in any errors, the operation
SHOULDfail. - Propagate all relevant information from any declared
item.definitionelements on all resulting items, as described on the Modular Forms page. - Adjust or remove the assemble-expectation extension from the Questionnaire - because it no longer requires assembly!
- Add the assembledFrom extension, pointing to the canonical URL and version of the Questionnaire that was assembled.
- Modify the Questionnaire.version to either be a UUID or append "-assembled".
- Optionally, check the resulting Questionnaire to ensure that it is valid according to the base Questionnaire and possibly any declared profiles. If the resulting Questionnaire is not valid, return a warning.
The result of the operation will be one of three things:
- If there are any errors, there will be a 4xx or 5xx error code and, ideally an OperationOutcome as the body of the response.
- If there are no errors, warnings or information messages that result from the assembly process, the body can just be the bare Questionnaire resource that resulted from the operation.
- If there are any warnings or information messages, then the body will be a Parameters instance with two parameters - 'response' containing the reulting Questionnaire and 'outcome' containing an OperationOutcome with the warning and/or information messages.
Examples
An example of a modular Questionnaire (as a sample input to the operation) can be found here.
An example of the result of invoking a modular Questionnaire (as a sample output from the operation) can be found here.