Implement Da Vinci DTR Documentation Templates and Rules using Questionnaire $populate with CQL
domain: hl7.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
In-depth guide
FHIR Bulk Data $export gotchas — the full failure-mode walkthrough related to hl7.org, checked against official docs, with linked verified routes.
Steps
Launch the DTR SMART app from a CRD Card link or standalone; the app receives the launch context including patient, encounter, and a reference to the Questionnaire (or Questionnaire package) required for prior authorization documentation
Retrieve the FHIR Questionnaire resource from the payer's FHIR endpoint; the Questionnaire will embed CQL Library references (via the cqf-library extension) containing the logic to prefill answers from EHR data
Invoke Questionnaire/$populate (a type-level or instance-level operation on the Questionnaire resource) with the QuestionnaireResponse draft and EHR FHIR context; the server or DTR app evaluates the embedded CQL against the patient's data to pre-populate answers
Render the (partially pre-filled) Questionnaire to the clinician; highlight auto-filled answers with their data source so the clinician can verify and complete remaining required fields
On clinician completion, submit the QuestionnaireResponse to the EHR FHIR server for storage; also package it into the PAS Claim/$submit Bundle if the prior authorization request is being submitted immediately
Store the completed QuestionnaireResponse in the EHR and optionally in the payer's system; reference it from the associated Task or CommunicationRequest to maintain the documentation audit trail
Known gotchas
Questionnaire $populate can be invoked at the type level (POST [base]/Questionnaire/$populate) or at the instance level (POST [base]/Questionnaire/[id]/$populate) — the DTR IG specifies instance-level invocation when the Questionnaire ID is known at launch time
CQL expressions in the Questionnaire reference specific FHIR resource types and profiles that must be available in the EHR; if the EHR does not expose a required resource type (e.g., Coverage or Observation), the CQL will return null and the field will not be pre-populated
Payer-authored CQL runs in the context of PHI on the EHR's FHIR server — implementers must carefully scope the CQL execution environment to prevent unauthorized data access beyond the specific patient context
Give your agent this knowledge — and 15,600+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?