A CRD client can send a technically valid CDS Hooks request to the wrong service, or send a supported hook using an incompatible CRD version. Neither problem is solved by the content of the coverage card. Before enabling a payer service, the client and payer need an agreed connection, a defensible coverage-to-service mapping, and a way to read the service’s current capabilities. The Da Vinci CRD v2.2.1 guide treats those steps as part of the implementation, not as background setup.
Establish who the service represents
Start with the organization on the member’s insurance card. The CRD guide uses that organization as the payer for routing purposes; the CRD server can handle its own internal delegation. A client should configure which payer or payers a service represents and invoke it only for a patient’s relevant current coverage. A service directory can help identify candidate endpoints, but discovery of a URL alone does not establish that the server may act for a payer or receive protected health information.
The guide describes a configuration exchange in which the payer supplies the server URL, supported hook types, and the scopes it needs. The client or provider organization confirms the server’s authority, trust relationship, enabled hooks, and token scopes. Keep those decisions as a change-controlled configuration record. For each coverage route, record the payer identity, endpoint, credential owner, permitted hooks, and date of the last review.
- Verify the payer-to-server relationship and the trust arrangement.
- Map active Coverage to the configured payer service.
- Document hook types and the reason for each requested scope.
Use discovery as the capability contract
A CRD client should read the CDS Hooks discovery response for the services, hook declarations, prefetch expressions, and configuration options it will actually use. Do not hard-code prefetch key names or assume the ordering of search filters: the CRD foundational guidance directs clients to inspect discovery for the exact keys and queries. Compare each declaration with the hook and order resource types implemented in the client before allowing it into a clinical workflow.
Endpoint shape matters too. Under v2.2.1, a server that supports endpoint discovery has at most one endpoint per coverage; a server without it exposes one CRD endpoint for all its coverages. That is a routing constraint, not an instruction to create a separate endpoint for every service category. Keep the coverage-to-endpoint rule separate from the business logic the payer runs behind that endpoint.
- Parse the current discovery response rather than relying on a saved example.
- Check supported hooks, prefetch, and response configuration together.
- Test each coverage route with the hook types the client enables.
Negotiate the CRD version for each hook
CRD v2.2.1 defines a davinci-crd.version extension in each service declaration. A server declares at least one supported CRD version per hook and lists every version it supports when there are several. The values use the major and minor components, such as 2.2, rather than the full 2.2.1 patch version. Treat this as a per-hook compatibility check: the endpoint may offer a hook the client recognizes while supporting a CRD version the client does not.
When a service advertises multiple versions for a hook, the request includes davinci-crd.requestedVersion so the server knows which contract to apply. A client may send it even when only one version is offered. In a test environment, exercise the selected version, an unsupported version, and a discovery change between calls. Capture the discovery snapshot used for each test so a later configuration change is distinguishable from a clinical-data problem.
Plan for change and failure in the live workflow
For an automated configuration relationship, the CRD guide says clients should run discovery at least daily and should retry discovery after a hook invocation error before failing. A changed response may need a human configuration step; discovering a new hook is not permission to enable it silently. Reconcile changes in versions, prefetch, configuration options, and endpoint routing with the approved payer connection.
A hook failure should also have a visible operational path. The supported-hooks guidance calls for an appropriate 4xx or 5xx response when the CRD server cannot process a request and an OperationOutcome for an issue detected at a FHIR-aware layer. The client may indicate that coverage guidance is unavailable. Record the affected payer, hook, request time, and error class, then route the case for a separate requirements check when needed. An unavailable CRD response is an unresolved check, not evidence that authorization is unnecessary.
- Refresh discovery and review capability changes.
- Keep an explicit fallback for unavailable guidance.
- Do not infer a coverage or authorization answer from a failed hook.