Generated from
smart-base/L4/skills/smart-l4/extract-questionnaire-response.md— do not edit here.
Extract resources from a questionnaire response
Skill id:
extract-questionnaire-response· Package:authoring-who-smart-guidelines· TaskTask_Extractofquestionnaire-data-capture.bpmn(Process_QuestionnaireDataCapture), lanepoint-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 declares | method |
|---|---|
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 / definitionExtract | definition-based |
sdc-questionnaire-observationExtract | observation-based |
Input and output
The contract is input.schema.json
and output.schema.json.
- In: the completed
questionnaireResponseand thequestionnaireit answers. - Out: a transaction
bundleof the extracted resources, each linked to the response by a Provenance orderivedFromwhere the method provides one;issueswhen 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:
smart-base/L4/schemas/skills/extract-questionnaire-response/input.schema.json - output:
smart-base/L4/schemas/skills/extract-questionnaire-response/output.schema.json
Processes that run this skill
| process | step(s) that name it |
|---|---|
| Capture data with an SDC questionnaire | Extract and save the resources |