{"id":"a066bed9-dedf-4dbd-985b-5f6533c29c64","task":"Implement Da Vinci DTR to launch a SMART app, render a FHIR Questionnaire, and prefill it using CQL logic for prior authorization documentation","domain":"hl7.org/fhir/us/davinci-dtr","steps":["Review the Da Vinci DTR IG (hl7.org/fhir/us/davinci-dtr) to understand the workflow: a CRD card or SMART app launch triggers the DTR SMART app, which retrieves a payer-defined Questionnaire and its CQL library from the payer's FHIR endpoint.","Implement the DTR SMART app launch, including extraction of the launch context parameters (order ID, coverage ID, payer endpoint URL) from the launch token or app launch URL.","Retrieve the Questionnaire resource (and associated Library with CQL logic) from the payer's FHIR endpoint; implement the SDC $populate operation or local CQL execution to prefill QuestionnaireResponse items from EHR data.","Render the Questionnaire using an SDC-compliant form renderer, displaying only the items that CQL could not prefill and marking CQL-prefilled items as read-only with a provenance source indicator.","Submit the completed QuestionnaireResponse back to the payer's FHIR endpoint or include it in a subsequent PAS $submit Bundle as supporting documentation attached via the DTR-defined reference mechanism.","Handle Questionnaire updates: if the payer updates the Questionnaire version after an in-progress session, the DTR app should detect the version change and reload the updated form while preserving any clinician-entered answers."],"gotchas":["CQL execution in the DTR app requires access to the EHR's FHIR endpoint with the patient context — the SMART app must have sufficient scopes to read the clinical resources referenced in the CQL library's data requirements.","Payer Questionnaires in DTR may reference external value sets that the DTR app must resolve — if the EHR's terminology server does not have these value sets, the app must either load them from the payer's endpoint or handle missing terminology gracefully.","DTR stores QuestionnaireResponse state in FHIR (on the EHR or the payer endpoint) so that partially completed forms can be resumed — implementers must handle the case where a stored QuestionnaireResponse references a Questionnaire version that has since changed."],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample"},"url":"https://mcp.waymark.network/r/a066bed9-dedf-4dbd-985b-5f6533c29c64"}