Structured Data Capture
3.0.0 - STU 3 International flag

This page is part of the Structured Data Capture FHIR IG (v3.0.0: STU 3) based on FHIR R4. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

OperationDefinition: Assemble Modular Questionnaire Operation

Official URL: http://hl7.org/fhir/uv/sdc/OperationDefinition/Questionnaire-assemble 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.

SDCAssemble

OPERATION: SDCAssemble

The official URL for this operation definition is:

http://hl7.org/fhir/uv/sdc/OperationDefinition/Questionnaire-assemble

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

Parameters

UseNameCardinalityTypeBindingDocumentation
INquestionnaire1..1Resource

The Modular Questionnaire to assemble the content of.

OUTreturn0..1Resource

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

OUToutcome0..1Resource

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

Notes:

Algorithm

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.

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.