Structured Data Capture
4.0.0-ballot - STU 4 ballot 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 4.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/sdc/ and changes regularly. See the Directory of published versions

OperationDefinition: Assemble Modular Questionnaire Operation

Official URL: http://hl7.org/fhir/uv/sdc/OperationDefinition/Questionnaire-assemble Version: 4.0.0-ballot
Standards status: Trial-use Maturity Level: 4 Computable Name: SDCAssemble
Other Identifiers: OID:2.16.840.1.113883.4.642.40.17.33.1

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.

Generated Narrative: OperationDefinition Questionnaire-assemble

URL: [base]/Questionnaire/$assemble

URL: [base]/Questionnaire/[id]/$assemble

Input parameters Profile:SDC Modular Questionnaire

Parameters

UseNameScopeCardinalityTypeBindingDocumentation
INquestionnaire1..1uri | Reference | Questionnaire

The Modular Questionnaire to assemble the content of. Can be provided as a canonical for the questionnaire, a questionnaire reference, or directly as a questionnaire resource.

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.