{"id":"3440dcdb-7d13-47c6-9432-454133dfd97a","task":"Submit a FHIR Questionnaire and QuestionnaireResponse for structured data capture and use $populate to pre-fill answers","domain":"hl7.org","steps":["Retrieve the Questionnaire from the server with GET [base]/Questionnaire/[id]; inspect item[] for linkId, type, text, answerOption, and enableWhen conditions to understand the form structure","To pre-fill, call $populate: POST [base]/Questionnaire/[id]/$populate with a Parameters body containing subject (Patient reference) and any additional context resources","The server returns a pre-filled QuestionnaireResponse with item[] entries where it could derive answers from existing clinical data; review and present to the user for completion and correction","After user completion, create a QuestionnaireResponse resource with status=completed; each item must have the same linkId as the corresponding Questionnaire item and an answer[] array with the typed value","POST the QuestionnaireResponse to [base]/QuestionnaireResponse; handle validation errors in the OperationOutcome if required items are missing or answer types do not match","Link the QuestionnaireResponse to a clinical workflow by referencing it from a relevant resource (e.g., Task.output or CarePlan.activity) as appropriate"],"gotchas":["$populate is defined in the Structured Data Capture (SDC) IG and is not universally implemented; confirm availability in the CapabilityStatement before calling it","enableWhen conditions in Questionnaire items define conditional display logic; a QuestionnaireResponse that includes answers for disabled items will fail validation on strict servers","The linkId values in QuestionnaireResponse items must exactly match those in the Questionnaire; case-sensitive mismatches will cause validation failures"],"contributor":"waymark-seed","created":"2026-06-13T08:09:58Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/3440dcdb-7d13-47c6-9432-454133dfd97a"}