Generated from smart-base/L4/skills/smart-l4/extract-questionnaire-response.md — do not edit here.

✎ Edit this page’s source

Extract resources from a questionnaire response

Skill id: extract-questionnaire-response · Package: authoring-who-smart-guidelines · Task Task_Extract of questionnaire-data-capture.bpmn (Process_QuestionnaireDataCapture), lane point-of-care-system.

Performed by a system: the app or EHR the health worker filled the form in. It decides nothing clinical; it carries out the mapping the form declares.

The operation is SDC $extract. Which of its methods applies is declared by the Questionnaire, never chosen here:

the Questionnaire declaresmethod
sdc-questionnaire-targetStructureMap (profile sdc-questionnaire-extr-smap)StructureMap-based: the map’s FHIR Mapping Language, as WHO’s immunization DAK maps IMMZ.C4 to a Patient and IMMZ.D1 to a Bundle
sdc-questionnaire-itemExtractionContext / definitionExtractdefinition-based
sdc-questionnaire-observationExtractobservation-based

Input and output

The contract is input.schema.json and output.schema.json.

  • In: the completed questionnaireResponse and the questionnaire it answers.
  • Out: a transaction bundle of the extracted resources, each linked to the response by a Provenance or derivedFrom where the method provides one; issues when the map or the definitions could not be applied.

Preconditions

  • The response is completed (complete-sdc-questionnaire).
  • The Questionnaire declares an extraction. One that declares none is not extracted: the process’s gateway stores the response as it is.

Success criteria

  • The Bundle is what the declared method produces from this response, and nothing else: no resource is added by guesswork.
  • It validates against the profiles the DAK names, and it is saved as one transaction (offline, it is queued whole and synchronised later).
  • A failure leaves the response stored and returns the issues; nothing is half-written.

Input and output contracts

What this skill takes and gives, as a class diagram drawn from its JSON Schema contracts by the schemas viewer’s own renderer. Each box links to its definition; each type to its specification.

input [1..1]output [1..1]questionnaireResponse [1..1]questionnaire [1..1]bundle [1..1]issues [0..*]extract-questionnaire-response«skill»extract-questionnaire-responseinput : ExtractQuestionnaireResponseInput [1..1]output : ExtractQuestionnaireResponseOutput [1..1]ExtractQuestionnaireResponseInput«json-schema»ExtractQuestionnaireResponseInputquestionnaireResponse : ExtractQuestionnaireResponseInpu… [1..1]questionnaire : ExtractQuestionnaireResponseInput.questi… [1..1]ExtractQuestionnaireResponseInput.questionnaireResponse«json-schema»ExtractQuestionnaireResponseInput.questionnaireResponseresourceType : "QuestionnaireResponse" [1..1]questionnaire : string [0..1]status : "in-progress" | "completed" | "amended" | "ente… [0..1]ExtractQuestionnaireResponseInput.questionnaire«json-schema»ExtractQuestionnaireResponseInput.questionnaireresourceType : "Questionnaire" [1..1]url : string [0..1]version : string [0..1]ExtractQuestionnaireResponseOutput«json-schema»ExtractQuestionnaireResponseOutputbundle : ExtractQuestionnaireResponseOutput.bundle [1..1]issues : ExtractQuestionnaireResponseOutput.issues[] [0..*]ExtractQuestionnaireResponseOutput.bundle«json-schema»ExtractQuestionnaireResponseOutput.bundleresourceType : "Bundle" [1..1]type : "transaction" [0..1]ExtractQuestionnaireResponseOutput.issues«json-schema»ExtractQuestionnaireResponseOutput.issuesseverity : "error" | "warning" | "information" [1..1]linkId : string [0..1]message : string [1..1]

Processes that run this skill

processstep(s) that name it
Capture data with an SDC questionnaireExtract and save the resources

folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev