Use the FHIR $data-requirements operation on a Measure to discover which FHIR resource types, profiles, and value sets the measure depends on before data collection
GET or POST /Measure/{id}/$data-requirements (with optional periodStart and periodEnd parameters) to retrieve a Library resource describing dependencies
Inspect the returned Library.dataRequirement elements; each entry specifies a FHIR resourceType, optional profile URL, and codeFilter or dateFilter constraints
For each dataRequirement with a codeFilter.valueSet, resolve the ValueSet canonical URL to understand which coded values must be present in patient data
Use the dataRequirement list to build targeted FHIR queries when running $collect-data, limiting data retrieval to only the required resource types and date ranges
Cross-reference the Library.relatedArtifact list to identify dependent CQL Libraries, value sets, and other Measures that must also be available on the server
Known gotchas
The returned Library resource from $data-requirements is a computed artifact, not a stored resource; its ID may be transient and should not be used to retrieve it later
Value set references in dataRequirement.codeFilter may be canonical URLs not yet expanded on the server; call $expand on each referenced ValueSet before building FHIR queries to confirm active codes
Date filters in dataRequirement may use FHIR path expressions referencing the measurement period parameter; interpret them relative to the periodStart and periodEnd you intend to use, not literally
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp