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

✎ Edit this page’s source

Complete an SDC questionnaire

Skill id: complete-sdc-questionnaire · Package: authoring-who-smart-guidelines · Task Task_Complete of questionnaire-data-capture.bpmn (Process_QuestionnaireDataCapture), lane health-worker.

Performed by a person: the health worker, or a client filling in a form on their own device. Their device’s form filler does the rendering; this skill is what the person does with it and what the result must be.

The meaning of every element is the FHIR R4 Questionnaire and QuestionnaireResponse and HL7 Structured Data Capture (SDC): this skill restates none of it. A DAK’s forms are SDC Questionnaires (for example sdc-questionnaire-extr-smap in WHO’s immunization and HIV DAKs); a form that is not cannot be completed by this skill.

Input and output

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

  • In: the questionnaire (a FHIR R4 Questionnaire resource), how it is renderedOn (form factor, language, whether offline), and, when the form is about someone, the subject and the SDC launchContext values; any prepopulated QuestionnaireResponse that SDC $populate or the device filled in before the person saw the form.
  • Out: the questionnaireResponse, and the issues the form filler raised that the person chose to leave (only for a response saved in-progress).

Preconditions

  • The Questionnaire is active (or draft, in a test), and the device renders it whole: no item is silently dropped.
  • When the form has a subject, the person has identified the client.

What the person does

  1. Read what is shown. Pre-populated answers are proposals: confirm or correct each one; the form filler marks none as confirmed for them.
  2. Answer the enabled items. An item whose enableWhen (or SDC enableWhenExpression) is false is not shown and gets no answer.
  3. Satisfy the form’s checks before submitting: every enabled required item is answered; each answer has the item’s type and stays within its answerOption/answerValueSet, maxLength, and SDC minValue, maxValue and regex constraints.
  4. Submit, which marks the response completed. Leaving it unfinished saves it in-progress, and nothing downstream reads it as complete.

Success criteria

  • questionnaireResponse.questionnaire is the Questionnaire’s canonical (url|version); subject is the client the form is about.
  • status is completed, every enabled required item has an answer, no disabled item has one, and every linkId is one of the Questionnaire’s.
  • The response validates against the Questionnaire (SDC form behaviour).

What it does not do

Creating the client’s resources from the answers is the system’s step, extract-questionnaire-response. Authoring or reviewing the form itself is fhir-harness’s fhir-questionnaire-wireframe.

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]questionnaire [1..1]renderedOn [1..1]subject [0..1]launchContext [0..*]prepopulated [0..1]questionnaireResponse [1..1]issues [0..*]complete-sdc-questionnaire«skill»complete-sdc-questionnaireinput : CompleteSDCQuestionnaireInput [1..1]output : CompleteSDCQuestionnaireOutput [1..1]CompleteSDCQuestionnaireInput«json-schema»CompleteSDCQuestionnaireInputquestionnaire : CompleteSDCQuestionnaireInput.questionna… [1..1]renderedOn : CompleteSDCQuestionnaireInput.renderedOn [1..1]subject : CompleteSDCQuestionnaireInput.subject [0..1]launchContext : CompleteSDCQuestionnaireInput.launchCont… [0..*]prepopulated : CompleteSDCQuestionnaireInput.prepopulated [0..1]CompleteSDCQuestionnaireInput.questionnaire«json-schema»CompleteSDCQuestionnaireInput.questionnaireresourceType : "Questionnaire" [1..1]url : string [0..1]version : string [0..1]CompleteSDCQuestionnaireInput.renderedOn«json-schema»CompleteSDCQuestionnaireInput.renderedOnformFactor : "mobile" | "tablet" | "desktop" [0..1]language : string [0..1]offline : boolean [0..1]CompleteSDCQuestionnaireInput.subject«json-schema»CompleteSDCQuestionnaireInput.subjectreference : string [0..1]display : string [0..1]CompleteSDCQuestionnaireInput.launchContext«json-schema»CompleteSDCQuestionnaireInput.launchContextname : string [1..1]resource : object [1..1]CompleteSDCQuestionnaireInput.prepopulated«json-schema»CompleteSDCQuestionnaireInput.prepopulatedresourceType : "QuestionnaireResponse" [1..1]questionnaire : string [0..1]status : "in-progress" | "completed" | "amended" | "ente… [0..1]CompleteSDCQuestionnaireOutput«json-schema»CompleteSDCQuestionnaireOutputquestionnaireResponse : CompleteSDCQuestionnaireOutput.q… [1..1]issues : CompleteSDCQuestionnaireOutput.issues[] [0..*]CompleteSDCQuestionnaireOutput.questionnaireResponse«json-schema»CompleteSDCQuestionnaireOutput.questionnaireResponseresourceType : "QuestionnaireResponse" [1..1]questionnaire : string [0..1]status : "in-progress" | "completed" | "amended" | "ente… [0..1]CompleteSDCQuestionnaireOutput.issues«json-schema»CompleteSDCQuestionnaireOutput.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 questionnaireComplete the form

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