Structured Data Capture
3.0.0 - STU 3 International flag

Structured Data Capture, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 3.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of and changes regularly. See the Directory of published versions

OperationDefinition: Assemble Modular Questionnaire Operation

Official URL: Version: 3.0.0
Standards status: Trial-use Maturity Level: 3 Computable Name: SDCAssemble

The $assemble operation takes a modular questionnaire (one that references sub-questionnaires and/or relies on definition elements to contain the content for item definitions) and produces the equivalent fully-inline Questionnaire. Full details on the process can be found here.

URL: [base]/Questionnaire/$assemble

Input parameters Profile: SDC Modular Questionnaire



The Modular Questionnaire to assemble the content of.


The fully assembled Questionnaire with all subQuestionnaires inlined and all items with item.definitions have had relevant metadata propagated into the item.


The OperationOutcome indicating any warnings or information messages with the assembly process



The assembly process for a modular questionnaire proceeds as follows:

  1. 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 SHOULD fail.
  2. Propagate all relevant information from any declared item.definition elements on all resulting items, as described on the Modular Forms page.
  3. Adjust or remove the assemble-expectation extension from the Questionnaire - because it no longer requires assembly!
  4. Add the assembledFrom extension, pointing to the canonical URL and version of the Questionnaire that was assembled.
  5. Modify the Questionnaire.version to either be a UUID or append "-assembled".
  6. 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.


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.